How to change the value of a reference contained inside a list?
<p>In python how can i change the value of references contained inside a list ? 
For example in the following code </p>

<pre><code>x = 'stack'
y = 'exchange'
l = [x,y]
l[1] = 'overflow'
</code></pre>

<p>The last line would actually replace <code>y</code> with <code>'overflow'</code> but what I want to do is change the reference contained at <code>l[1]</code> to <code>'overflow'</code> how can I achieve the same ? </p>

<p>PS : <code>y = 'overflow'</code> is not an accepted answer :P </p>

<p>The context probably will make the problem clearer there are 50 variable that I have inside a list initialised to zero and I want them to set their values at run-time.so that when at a later point of time I do a print variable50 , i get the new value not zero.</p>
