title: Is there a way to iterate a specified number of times without introducing an unnecessary variable?
body: <p>If I want to iterate <code>n</code> times in Java, I write:</p>
  
  <pre><code>for (i = 0; i &lt; n; i++) {
      // do stuff
  }
  </code></pre>
  
  <p>In Python, it seems the standard way to do this is:</p>
  
  <pre><code>for x in range(n):
      # do stuff
  </code></pre>
  
  <p>As always, Python is more concise and more readable.  But the <code>x</code> bothers me, as it is unnecessary, and PyDev generates a warning, since <code>x</code> is never used.</p>
  
  <p>Is there a way to do this that doesn't generate any warnings, and doesn't introduce unnecessary variables?</p>