Python Basics: for i, element in enumerate(seq)..why/how does this work?
<p>Hello I've found an intersting snippet:</p>

<pre><code>seq = ["one", "two", "three"] #edited
for i, element in enumerate(seq):
    seq[i] = '%d: %s' % (i, seq[i])

&gt;&gt;&gt; seq
['0: one', '1: two', '2: three']
</code></pre>

<p>I wonder how python is doing that.... for me element should be undefined...but obviously it isn't..what does python do here?</p>

<p>Thanks a lot!</p>
