title: How to escape “\” characters in python
body: <p>i am very new to regular expression and trying get "\" character using python </p>
  
  <p>normally i can escape "\" like this </p>
  
  <pre><code>print ("\\");
  print ("i am \\nit");
  </code></pre>
  
  <p>output </p>
  
  <pre><code>\
  i am \nit
  </code></pre>
  
  <p>but when i use the same in regX it didn't work as i thought </p>
  
  <pre><code>print (re.findall(r'\\',"i am \\nit"));
  </code></pre>
  
  <p>and return me output </p>
  
  <pre><code>['\\']
  </code></pre>
  
  <p>can someone please explain why </p>