title: Iteration number of for loop in a template
body: <p>In a Django template, I want to create a for loop that iterates through a list. During that loop, I also want to be able to use the iteration number of the loop.</p>
  
  <p>For example, if <code>some_list</code> has 4 elements, then:</p>
  
  <pre><code>{% for o in some_list %}
      # Print out the iteration number
  {% endfor %}
  </code></pre>
  
  <p>Should print out the following:</p>
  
  <pre><code>&gt;&gt; 0
  &gt;&gt; 1
  &gt;&gt; 2
  &gt;&gt; 3
  </code></pre>
  
  <p>How can I do this?</p>