+ 1
How can I get a newline by input?
How can I get a newline by input? I tried to type \n and \\n, but they don't work.
3 Answers
+ 2
Just type \n in a string and python automatically generates new line...
print ("\n")
Note: If you type print ("\\n") the new line character is ignored and you'd get the output \n.
+ 1
show your prog plz
0
I'm learning Python basic concepts module 7. And I want to know how to use input function to generate new line. In the program I type Hello\nWorld, but no new line generate.
https://code.sololearn.com/c8eB9y8bnIoK/?ref=app