title: How to read file from specific line and write the output?
body: <p>I want to read from output.txt lines 121-136 and save them in same format to zxyr.txt.File looks like this:</p>
  
  <pre><code>&gt;ZYXR //74
  -6.440208621086e+03 -4.758666382870e+03 -3.995858566350e+03 -4.934315690511e+03 -5.049765912718e+03 
  -4.323241464318e+03 -4.246930447741e+03 -3.836596391287e+03 -3.357569224670e+03 -2.955821531683e+03 
  -2.579438902492e+03 -2.291910045847e+03 -1.831407086906e+03 -1.630707014227e+03 -1.376537942484e+03 
  </code></pre>
  
  <p>My code</p>
  
  <pre><code>from __future__ import with_statement
  
  inFile = open('output.txt','r')
  outFile = open('zxyr.txt', 'w')
  
  lines=[121, 136]
  i=0
  
  for line in inFile:
      if i in lines:
          counter = str(int(inFile.read().strip())
          outFile.seek(0)
          outFile.write(counter)
      i+=1
  </code></pre>
  
  <p>But</p>
  
  <pre><code>  File "ex1.py", line 12
      outFile.seek(0)
            ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>What is wrong with my code?</p>