What's raw string? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

What's raw string?

I don't get it,. what's the meaning of adding r. thx!

10th Jul 2016, 10:26 AM
Ahmed ZAIRI
Ahmed ZAIRI - avatar
2 Respuestas
+ 1
raw strings ignore escape sequences. if you run: print('test\ntest') print(r'test\ntest') you will see that the first statement prints two lines and the second one only one since new line is treated as normal characters in raw string
11th Jul 2016, 7:30 AM
RedAnt
RedAnt - avatar
0
@RedAnt clear thanks!
11th Jul 2016, 7:47 PM
Ahmed ZAIRI
Ahmed ZAIRI - avatar