title: Using raw literal representations when working with variable strings
body: <p>I am trying to use a for loop to copy files in different source folders into the same destination folder. I like to use literal representations to avoid issues with multiple backslashes in the file paths. I could not find the proper way to get a literal representation of a variable. Any tip would be appreciated. The code is below:</p>
  
  <pre><code>import shutil
  destination_folder=DF
  
  for i in range (1,3):
      new_folder='folder_'+str(i)
      new_path=os.path.join('C:\foo', new_folder, file_to_copy)
      source_file= r(new_path)                #WRONG
      destination= r(destination_folder)      #WRONG
      shutil.copy(source_file, destination)
  </code></pre>