What's the easiest way to iterate on a file's lines, keeping a counter?
<p>What's the cleanest code that iterates on the lines of a text file, while simultaniously increamenting a counter?</p>

<p>I understand that with multiple assignment, there's a cleaner syntax than</p>

<pre><code>i = 0
for line in f:
    ...
    ++i
</code></pre>
