title: Replacing backslashes in Python strings
body: <p>I have some code to encrypt some strings in Python. Encrypted text is used as a parameter in some urls, but after encrypting, there comes backslashes in string and I cannot use single backslash in urllib2.urlopen.</p>
  
  <p>I cannot replace single backslash with double. For example:</p>
  
  <pre><code>print cipherText 
  
  '\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb'
  
  print cipherText.replace('\\','\\\\')
  
  '\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb'
  </code></pre>
  
  <p>Also putting r in front of \ in replace statement did not worked. </p>
  
  <p>All I want to do is calling that kind of url:</p>
  
  <pre><code>http://awebsite.me/main?param="\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb"
  </code></pre>
  
  <p>And also this url can be successfully called:</p>
  
  <pre><code>http://awebsite.me/main?param="\\t3-@\\xab7+\\xc7\\x93H\\xdc\\xd1\\x13G\\xe1\\xfb"
  </code></pre>