title: How to write every other line in a text file?
body: <pre><code>inputFile = open('original_text.txt','r')
  outputFile = open('half_text.txt','w')
  
  line = inputFile.readline()
  count = 0 
  for line in inputFile:
      outputFile.write(line)
      count += 1
      if count % 2 == 0:
          print(line)
  
  inputFile.close()
  outputFile.close()
  </code></pre>
  
  <p>It keeps skipping the 1st line. For instance, the text file right now has 10 lines. So it prints the 3rd 5th 7th and 9th. So I'm just missing the first. </p>