Lesson question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Lesson question

The lesson states “To avoid any confusion while working with regular expressions, we would use raw strings ... Raw strings don't escape anything, “ What is meant by “raw strings don’t escape anything “?

13th Oct 2019, 12:52 PM
GeoK68
GeoK68 - avatar
1 Answer
+ 2
put this into your IDE. print('solo \nlearn') print(r'solo \nlearn') The '\n' means 'new line', in a raw string, the '\n' is part of the sting and 'escapes' it's 'special' meaning.
13th Oct 2019, 1:09 PM
rodwynnejones
rodwynnejones - avatar