How to change data in the container while iterating in python
<p>Given the following example:</p>

<pre><code>container = [ (1, "a") , 
              (40, "b") ,
              (24, "c") ,  #we intend to change this
              (103, "d")
            ]

for k,v in container:
    if k == 24:
        v += " good"

print container
</code></pre>

<p>The <strong><em>(24, "c")</em></strong> data pair in <strong><em>container</em></strong> will still remain its original value, 
and won't be changed to <strong><em>(24, "c good")</em></strong>. What would be the way to alter it to <strong><em>(24, "c good")</em></strong> as intended during the iteration?</p>

<p>I use python 2.7 , but 3.x examples are also welcome.</p>

<p>Thanks.</p>
