Raw Strings with Variables

WilsonOfCanada wwn1 at sfu.ca
Tue Aug 18 19:16:33 EDT 2009


Hellos,

I know that if you have:

happy = r"C:\moo"
print happy

you get C:\moo instead of C:\\moo

The thing is that I want to do this a variable instead.

ex. testline = fileName.readline()
      rawtestline = r testline

Thanks



More information about the Python-list mailing list