title: range(len(list)) or enumerate(list)?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11901081/only-index-needed-enumerate-or-xrange">Only index needed: enumerate or (x)range?</a>  </p>
  </blockquote>
  
  
  
  <p>Which of these would be considered better/clearer/faster/more 'Pythonic'? I don't care about the content of the list <code>L</code>, just how long it is.</p>
  
  <pre><code>a = [f(n) for n, _ in enumerate(L)]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>a = [f(n) for n in range(len(L))]
  </code></pre>
  
  <p>If it makes any difference, the function <code>f</code> makes use of <code>len(list)</code> as well.</p>