\n Doesn't work for me. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

\n Doesn't work for me.

When i try to use it in strings, it prints the \n and doesnt give me a new line. Is there something I'm doing wrong?

18th Dec 2016, 4:33 PM
Tyler Ross
Tyler Ross - avatar
2 Answers
+ 4
or put string inside three quotes to make it preserved (hit enter button to add newline in preserved)
18th Dec 2016, 4:46 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
try \\n
18th Dec 2016, 4:36 PM
Valen.H. ~
Valen.H. ~ - avatar