title: How to insert a new line before the first line in a file using python?
body: <p>More details below:</p>
  
  <pre><code>1st line
  
  2nd line
  
  3rd line
  
  4th line
  
  ...
  </code></pre>
  
  <p>Now want to insert a new line named <code>zero line</code> before <code>1st line</code>. File looks like below:</p>
  
  <pre><code>zero line
  
  1st line
  
  2nd line
  
  3rd line
  
  4th line
  
  ...
  </code></pre>
  
  <p>I know <code>sed</code> command can do this work, but how to do it using python? Thanks</p>