title: python find if newline is in string
body: <p>I am trying to find if a "\n" character is in a string using this:</p>
  
  <pre><code>if "\n" in errors.text
  </code></pre>
  
  <p>This works fine for a string like "one\ntwo" but when the newline is at the end of the string like "one\n", it doesn't seem to work. I am using selenium to get this string from a website. Is it possible that it is not catching the newline at the end and simply not including it? </p>
  
  <p>Or could this be the problem?</p>
  
  <pre><code>fixedText = errors.text.split("\n")[0]
  </code></pre>
  
  <p>I want the fixed text to remove all newlines and only get the first line of text. It works except for the case discussed above</p>