0

Why output still has \n ??

24th May 2019, 9:35 AM
George
4 Respostas
+ 7
Can you show the code that you used? Otherwise my answer is "because fairies"
24th May 2019, 9:39 AM
jay
jay - avatar
+ 2
If you meant in Python, there is just 1 situtuation, where \n is displayed as newline. In intepreter, when you type a string including \n >>>"Hello\nBye" 'Hello\nBye' It does not display \n as newline, also the output includes quotes ' '. But if you use print: >>>print("Hello\nBye") Hello Bye It displays \n as newline, but it also doesn't display the quotes. Note! A typical beginner mistake in SoloLearn playground is to use >>> in playgrouns, but >>> only means that "you are using the intepreter", which is included by Python IDLE. In SoloLearn Python playground you can only print text using print().
24th May 2019, 9:50 AM
Seb TheS
Seb TheS - avatar
+ 1
did you use \\n in your code?
24th May 2019, 10:24 AM
Rfs
Rfs - avatar