title: remove \n from the end of list item
body: <p>I have this code </p>
  
  <pre><code>def return_not_existing_signals(list_of_signals,read_or_write) :
      not_used_produced_signals = []
      #print(list_of_signals)
      if read_or_write =="read":
          file_to_create= "c:\\path\\read.txt"
      else:
          file_to_create = "c:\\path\\write.txt"
  
      for i in list_of_signals :
          i.replace('\n','')
          if not search_for_signals(i) :
              not_used_produced_signals.append(i)
      write_to_txt(not_used_produced_signals,file_to_create)
  
  
  def search_for_signals(name_of_signal):
      for filename in Path('c:\path').glob('**/*.h') : 
          with open(filename) as f:
              if name_of_signal in f.read():
                  return True
      return False
  </code></pre>
  
  <p>The problem is that some of the <code>list_of_signals</code> are having \n at the end ( example: test1234rwq4\n) </p>
  
  <p><code>I.replace(\'n',' ' )</code> isn't working</p>