title: Writing to a new line in python in append mode
body: <p>how can i append to a new line for an existing file in python ?</p>
  
  <p>my code is :</p>
  
  <pre><code>        status_done="Completed"
          f = open("%s\%s%s" % (path,self.filename,filelog_ext),"a")
          data=("%s \r" % status_done)        
          f.writelines(data)
  </code></pre>
  
  <p>i tried \r , \n , both \r\n
  none of them work, it always appends to the end of the existing line</p>
  
  <p>here's the output it gave me:</p>
  
  <p>line1:<a href="http://www.md5.comCompleted" rel="nofollow">http://www.md5.comCompleted</a> </p>
  
  <p>i want the Completed to be on a new line i.e:</p>
  
  <p>line1:<a href="http://www.md5.com" rel="nofollow">http://www.md5.com</a></p>
  
  <p>line2:Completed </p>