title: Skip last 5 line in a file using python
body: <p>I wanted to remove last few lines in a file using python. The file is huge in size,so to remove first few line I'm using the following code </p>
  
  <pre><code>import sys
  with open(sys.argv[1],"rb") as f:
      for _ in range(6):#skip first 6 lines
          next(f)
      for line in f:
          print line
  </code></pre>