title: casting raw strings python
body: <p>Given a variable which holds a string is there a quick way to cast that into another raw string variable?</p>
  
  <p>The following code should illustrate what I'm after:</p>
  
  <pre><code>line1 = "hurr..\n..durr"
  line2 = r"hurr..\n..durr"
  
  print(line1 == line2)  # outputs False
  print(("%r"%line1)[1:-1] == line2)  # outputs True
  </code></pre>
  
  <p>The closest I have found so far is the <code>%r</code> formatting flag which seems to return a raw string albeit within single quote marks. Is there any easier way to do this kind of thing?</p>