title: how to detect an escape sequence in a string
body: <p>Given a string named line whose raw version has this value:</p>
  
  <pre><code>\rRAWSTRING
  </code></pre>
  
  <p>how can I detect if it has the escape character \r?  What I've tried is:</p>
  
  <pre><code>if repr(line).startswith('\r'):
      blah...
  </code></pre>
  
  <p>but it doesn't catch it.  I also tried find, such as:</p>
  
  <pre><code>if repr(line).find('\r') != -1:
      blah
  </code></pre>
  
  <p>doesn't work either.  What am I missing?</p>
  
  <p>thx!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>thanks for all the replies and the corrections re terminolgy and sorry for the confusion. </p>
  
  <p>OK, if i do this </p>
  
  <pre><code>print repr(line)
  </code></pre>
  
  <p>then what it prints is:</p>
  
  <pre><code>'\rSET ENABLE ACK\n'
  </code></pre>
  
  <p>(including the single quotes). i have tried all the suggestions, including:</p>
  
  <pre><code>line.startswith(r'\r')
  line.startswith('\\r') 
  </code></pre>
  
  <p>each of which returns False.  also tried:</p>
  
  <pre><code>line.find(r'\r')
  line.find('\\r')
  </code></pre>
  
  <p>each of which returns -1</p>