title: Python: Saving a string to file without overwriting file's contents
body: <p>I need to add my program's outputs to a saved file every time I run the program without overwriting the previous outputs.</p>
  
  <p>This is how I'm writing to a file now:</p>
  
  <pre><code>lead.write(str(alldates))
  </code></pre>
  
  <p>Any ideas?</p>