Reputation: 17
Why does the code?
print(print("Hello"))
send back to the user.
hello
none
I don't get it.
Upvotes: 0
Views: 66
Reputation: 36680
print
is function which does return None
and have side effect of printing
print("Hello")
does print Hello
and return None
so external print
does "see" that its' 1st argument is None
and print that
Upvotes: 1