title: rstrip not removing newline char what am I doing wrong?
body: <p>Pulling my hair out here... have been playing around with this for the last hour but I cannot get it to do what I want, ie. remove the newline sequence.  </p>
  
  <pre><code>def add_quotes( fpath ):
  
          ifile = open( fpath, 'r' )
          ofile = open( 'ofile.txt', 'w' )
  
          for line in ifile:
              if line == '\n': 
                  ofile.write( "\n\n" )
              elif len( line ) &gt; 1:
                  line.rstrip('\n')
                  convertedline = "\"" + line + "\", "
                  ofile.write( convertedline )
  
          ifile.close()
          ofile.close()
  </code></pre>