title: Python remove last line of a file
body: <p>I have some files like this:</p>
  
  <pre><code>a:...
  a:...
  a:...
  a:...
  count = ...
  </code></pre>
  
  <p>and I just need to keep the <code>a:...</code> values lines.
  What is the fastest way to remove that last line (which always starts with <code>count =</code>) ?</p>