0
List with strings to list with raw strings
I need to create a list with raw strings provided a list with strings. Does anyone of you know how to do that? https://code.sololearn.com/c6MUJK7pgSup/?ref=app I tried several ways.
1 Respuesta
0
>>> plain = "\\a\a\a\b"
>>> raw = r"\\a\a\a\b"
>>> print plain
\a
>>> print raw
\\a\a\a\b
>>> plain == raw
False
>>> temp = "%r" % plain
>>> new = temp[1:-1]
>>> print new
\\a\x07\x07\x08
>>> print raw
\\a\a\a\b
>>> new == raw
False
>>>
this program is to rawify string .There are different strings to be used in strings