title: python simple iteration
body: <p>i would like to ask what is the best way to make simple iteration. suppose i want to repeat certain task 1000 times, which one of the following is the best? or is there a better way?</p>
  
  <pre><code>for i in range(1000):
      do something with no reference to i
  
  i = 0
  while i &lt; 1000:
      do something with no reference to i
      i += 1
  </code></pre>
  
  <p>thanks very much</p>