+ 1
why do we need newline character '\n' ?
7 Respuestas
+ 2
To insert newline? I always use it.
+ 2
you can also use the three (double) quotes and hit return key where you want to have a new line:
print("First string" + ", " + """second<return>string""")
+ 2
you can also use the three (double) quotes and hit return key where you want to have a new line:
print("First string" + ", " + """second<return>string""")
0
we need a newline character "\n" to enter a new line while printing something on the screen
0
You need the new line character '\n' if you want to format the output, if you want print a string into more than one line.
0
Consider typing in notepad or something similar where when you hit the 'enter' button (which has no representable letter or symbol on screen) to go to a newline. There is a lot of variation in the actual implementation but basically you can think of it as entering a \n when you press the key. Same situation with the 'tab' button inserting a \t or equivalent. You have always used them but now they are exposed to you through programming.
0
write "\""