+ 4

Why does print (print('print')) give me print \n None??

17th Apr 2017, 12:23 PM
Ninad Khade
Ninad Khade - avatar
3 Respuestas
+ 7
Print function outputs its received parameter and puts the cursor to the next line. It doesn't return anything So the inner print function prints the word 'print' moves the cursor to the next line ('\n') and now doesn't have any value, so the best description for it is None. And the outer print function prints its received parameter None
17th Apr 2017, 12:48 PM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
+ 1
Thanks Bro..
22nd Apr 2017, 5:08 AM
Ninad Khade
Ninad Khade - avatar
0
It finally answer is print("print")
1st Sep 2017, 6:38 AM
Muruvazhakan P
Muruvazhakan P - avatar