title: Delete newline / return carriage in file output
body: <p>I have a wordlist that contains returns to separate each new letter.  Is there a way to programatically delete each of these returns using file I/O in Python?  </p>
  
  <p>Edit: I know how to manipulate strings to delete returns.  I want to physically edit the file so that those returns are deleted.</p>
  
  <p>I'm looking for something like this:</p>
  
  <pre><code>wfile = open("wordlist.txt", "r+")           
  for line in wfile:
      if len(line) == 0:
          # note, the following is not real... this is what I'm aiming to achieve.
          wfile.delete(line)
  </code></pre>