title: How to get rid of double backslash in python windows file path string?
body: <p>I have a dictionary:</p>
  
  <pre><code>my_dictionary = {"058498":"table", "064165":"pen", "055123":"pencil"}
  </code></pre>
  
  <p>I iterate over it:</p>
  
  <pre><code>for item in my_dictionary:
      PDF = r'C:\Users\user\Desktop\File_%s.pdf' %item
      doIt(PDF)
  
  def doIt(PDF):
      part = MIMEBase('application', "octet-stream")
      part.set_payload( open(PDF,"rb").read() )
  </code></pre>
  
  <p>But I get this error:</p>
  
  <pre><code>IOError: [Errno 2] No such file or directory: 'C:\\Users\\user\\Desktop\\File_055123.pdf'
  </code></pre>
  
  <p>It can't find my file. Why does it think there are double backslashes in file path? </p>