Why does the following code always output 16?
<pre><code>def makeActions():
    acts=[]
    for i in range(5):
     print len(acts)
     acts.append(lambda x: i ** x)
     print acts[i]
    return acts
acts=makeActions()
for i in range(5):
    print acts[i](2)
</code></pre>

<p>Output:</p>

<pre><code>16
16
16
16
16
</code></pre>

<p>Expected output:</p>

<pre><code>0
1
4
9
16
</code></pre>
