Iteration count in python?
<p>Let's say I have a list of tuples l, and I do something like this:</p>

<pre><code>for (a,b) in l:
     do something with a,b, and the index of (a,b) in l
</code></pre>

<p>Is there an easy way to get the index of (a,b)? I can use the index method of list, but what if (a,b) is not unique? I can also iterate on the indexes in the first place, but its cumbersome. Is there something simpler?</p>
