Getting iteration counter in nested for loop
<p>I want a counter to keep count how many iterations in total I have done. 
I do:</p>

<pre><code>counter = 0;
for i, item in enumerate(items):
    for j, anotheritem in enumerate(anotheritems):
        counter += 1;
</code></pre>

<p>But I can't help asking is there a more pythonic way?</p>
