Why this output for the given code? pls. explain me... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4

Why this output for the given code? pls. explain me...

https://code.sololearn.com/co9IsUwPt6FT/?ref=app

9th Jun 2019, 4:19 AM
Manisha Sahu
Manisha Sahu - avatar
2 Respostas
+ 9
When we put r or R before a string it is called raw string...that is why \n is just treated as a normal character it is not treated as new line...
9th Jun 2019, 4:50 PM
Ā°Ā°MēDh@Ā°Ā°
Ā°Ā°MēDh@Ā°Ā° - avatar
+ 5
In the first line of code r is used to suppress real meaning of escape character \n Whereas in second line of code escape character works fully normal and takes you to the new line
9th Jun 2019, 4:48 AM
Ashish Gupta