title: How to read the rest of the lines? - python
body: <p>I have a file and it has some header lines, e.g.</p>
  
  <pre><code>header1 lines: somehting something
  more headers then
  somehting something
  ----
  
  this is where the data starts
  yes data... lots of foo barring bar fooing data.
  ...
  ...
  </code></pre>
  
  <p>I've skipped the header lines by looping and running <code>file.readlines()</code>, <strong>other than looping and concating the rest of the lines, how else can i read the rest of the lines?</strong></p>
  
  <pre><code>x = """header1 lines: somehting something
  more headers then
  somehting something
  ----
  
  this is where the data starts
  yes data... lots of foo barring bar fooing data.
  ...
  ..."""
  
  with open('test.txt','w') as fout:
    print&gt;&gt;fout, x
  
  fin = open('test.txt','r')
  for _ in range(5): fin.readline();
  rest = "\n".join([i for i in fin.readline()])
  </code></pre>