title: How to overwrite a file correctly?
body: <p>I would like to know how to overwrite a file in python. When I'm using <code>"w"</code> in the <code>open</code> statement, I still get only one line in my output file.</p>
  
  <pre><code>article = open("article.txt", "w")
  article.write(str(new_line))
  article.close()
  </code></pre>
  
  <p>Can you tell me please how can I fix my problem?</p>