0
Why output still has \n ??
4 ответов
+ 7
Can you show the code that you used?
Otherwise my answer is "because fairies"
+ 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().
+ 1
did you use \\n in your code?