title: How to check if \n is in a string
body: <p>I want to remove <code>\n</code> from a string if it is in a string.
  I have tried:</p>
  
  <pre><code>slashn = str(chr(92))+"n"
  if slashn in newString:
          newerString = newString.replace(slashn,'')
          print(newerString)
  else:
      print(newString) 
  </code></pre>
  
  <p>Assume that newString is a word that has <code>\n</code> at the end of it. E.g. <code>text\n</code>.</p>
  
  <p>I have also tried the same code except slash equals to <code>"\\"+"n"</code>.</p>