title: How can i remove line feed character in text file?
body: <pre><code>import subprocess
  cmd = 'tasklist'
  proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
  file = open("Process_list.txt", "r+")
  for line in proc.stdout:
          file.write(str(line))
  
  file.close()
  </code></pre>
  
  <p>i just wrote saving process list to text file. But Process_list.txt file has lots of line feed character like \r\n. How can i remove it? i used replace and strip func before</p>