title: How can I put an actual backslash in a string literal (not use it for an escape sequence)?
body: <p>I have this code:</p>
  <pre><code>import os
  path = os.getcwd()
  final = path +'\xulrunner.exe ' + path + '\application.ini'
  print(final)
  </code></pre>
  <p>I want output like:</p>
  <pre><code>C:\Users\me\xulrunner.exe C:\Users\me\application.ini
  </code></pre>
  <p>But instead I get an error that looks like:</p>
  <pre><code>SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \xXX escape
  </code></pre>
  <p>I don't want the backslashes to be interpreted as escape sequences, but as literal backslashes. How can I do it?</p>
  <hr />
  <p><sub>Note that if the string should <em>only</em> contain a backslash - more generally, should have an <em>odd number of backslashes at the end</em> - then raw strings <a href="https://stackoverflow.com/questions/647769/why-cant-pythons-raw-string-literals-end-with-a-single-backslash?r=SearchResults&amp;s=3%7C148.0506"><strong>cannot</strong> be used</a>. Please use <a href="https://stackoverflow.com/questions/19095796/">How can I get a string with a single backslash in it?</a> to close questions that are asking for a string with just a backslash in it. Use <a href="https://stackoverflow.com/questions/4703516/">How to write string literals in python without having to escape them?</a> when the question is specifically about wanting to avoid the need for escape sequences.</sub></p>