0

Why do we get \n in the output?

17th Feb 2017, 9:09 AM
arushi gaur
6 Antworten
+ 8
*what and you will get a new line. :D
17th Feb 2017, 9:47 AM
Mr.Robot
Mr.Robot - avatar
+ 8
Go to play ground -> select python -> type print("Hello\nworld") -> and check the output
17th Feb 2017, 9:56 AM
Mr.Robot
Mr.Robot - avatar
+ 7
No problem @arushi , keep coding :')
17th Feb 2017, 10:03 AM
Mr.Robot
Mr.Robot - avatar
+ 2
\n is used to insert or go to new line in output. \ is used to escape characters. if you want to print \n then type "\\n" to actually print \n on screen. if you don't want new line in output then use print('your string', end='')
18th Feb 2017, 11:01 AM
Amod Tawade
Amod Tawade - avatar
0
but why \n is printing in the output
17th Feb 2017, 9:49 AM
arushi gaur
0
thank u so much...i got confused😂😃
17th Feb 2017, 10:03 AM
arushi gaur