title: Stripping returns and replacing them with commas with Python
body: <p>I have a text document that I am trying to find the returns and replace them with a comma. I keep getting a syntax error and the the print function at the end is highlighted but I have no idea what is going wrong.</p>
  
  <pre><code>orders = []
  try:
      with open('vlc.txt') as data:
          for each_line in data:
              try:
                  each_line.replace("/n", ",")
                  order = order.strip()
                  orders.append(order)
  
              except ValueError:
                  pass
  with open("vlc_clean.txt","wb") as vlc_file:
      pickle.dump(orders, vlc_file)
  
  except IOError as err:
      print('File Error: ' + str(err))
  
  except pickle.PickleError as perr:
      print('Pickling error: ' + str(perr)
  
  print(orders)
  </code></pre>