title: Replace line feed (LF) with space but not affect carriage return (CR)
body: <p>Is there a way to remove line feeds (LF) and replace with space and not affect the carriage returns (CR)?</p>
  
  <p>I've tried the below but it also removes the carriage returns:</p>
  
  <pre><code>import fileinput
  import sys
  
  def replaceAll(file,searchExp,replaceExp):
      for line in fileinput.input(file, inplace=1):
          if searchExp in line:
              line = line.replace(searchExp,replaceExp)
          sys.stdout.write(line)
  
  replaceAll("hold1.csv","\n","\s")
  </code></pre>
  
  <p>The input text would be something like this with | as a separator:</p>
  
  <pre><code>field1 | field2| field3 some textLF
  
  more textLF
  
  more text|field4 | field5 CR
  </code></pre>
  
  <p>Which I would like to see in the format of:</p>
  
  <pre><code>field1 | field2| field3 some text more text more text|field4 | field5 CR
  </code></pre>