+ 1
Making a normal string into a raw one
Can I convert a normal string (name it my_str) into a raw one as follows raw = r"" for letter in my_str: raw += letter
1 Resposta
+ 3
Ashkan Ranjbar You don't need to convert a normal string into a raw one or vice versa, as the normal string and the raw string are not data types. A raw string is only a convenient way of typing a string. The code below makes these things clearer. As you can see r"some text" and "some text" are the same string objects
https://code.sololearn.com/cir9St39oh2x/?ref=app