What is the best way to count in a for loop? : <p>I find myself in the need of counting through lists with the help of for loops. What I end up doing is this:</p>

<pre><code>L = ['A','B','C','D']

n = 0
for i in L:
    print(L[n])
    n += 1
</code></pre>

<p>I was wondering if there is a better way for doing this, without having to declare an extra variable <code>n</code> every time?</p>

<p>Please keep in mind that this is just a simplified example.  A solution like this would not suffice (although in this example the results are the same):</p>

<pre><code>L = ['A','B','C','D']

for i in L:
    print(i)
</code></pre>
