0
When I type in the following statement in idle print(print("print")) I'm getting the following result :"print" in line 1 and "none" in line 2. why is none there in the output??
4 Respuestas
+ 7
Because print() doesn't return anything, so the outer print() evaluates the value of its parameter as none.
+ 1
you forgot to wrap the inner print in single quotes.
+ 1
You have to type print('print("print")'). You forgot the '-s. Without this the 2 print() counts as 1.
0
@adrin if you wrap outer print by ' ' you'll get diffrent o/p
'print("print")