title: remove header and add another one
body: <p>I have to remove the first 2 headers of many files and replace them with another one. As I am new to Python and programming, I have been using the following code </p>
  
  <pre><code>import glob
  import os
  list_of_files = glob.glob('./*.txt')
  for file_name in list_of_files:
      os.system('sed "1,2d" %s | sort -k1 &gt; %s.sort' %(file_name,file_name))
      os.system ('cat header file %s.sort &gt; %s.header' %(file_name,file_name))
  </code></pre>
  
  <p>which works. However I think there should be a better way of getting this done. Also I am unnecessarily making an extra file *.sort which I don't require.</p>