title: Why is my file-reading function only reading odd-numbered lines?
body: <p>I have a text file containing all integers from 0 to 99, inclusive:</p>
  <pre><code>0
  1
  2
  3
  [...]
  98
  99
  </code></pre>
  <p>And I've written the following code to try and print out each line:</p>
  <pre class="lang-py prettyprint-override"><code>f = open('number_list.txt', 'r')
  for x in f:
      r = f.readline()
      r2 = r.rstrip('\n')
      print(r2)
  </code></pre>
  <p>But for some reason it only prints every second number:</p>
  <pre><code>1
  3
  5
  [...]
  97
  99
  </code></pre>
  <p>Why is this happening?</p>