0

Hi, I'm new,trying to figure out why, at the end of this output the word none appears.and when print is indented its hello,none.

https://code.sololearn.com/chn0Zs5JR6Z8/?ref=app

7th Jan 2023, 7:32 PM
Chris Kennison
Chris Kennison - avatar
3 Respuestas
7th Jan 2023, 7:46 PM
Ali M
Ali M - avatar
+ 4
Hi, Chris Kennison ! That’s because the print function dosen’t return any value (except None). >>> print(print()) None
8th Jan 2023, 1:19 AM
Per Bratthammar
Per Bratthammar - avatar
+ 3
when you use i=print(...) in the loop it prints that but after the loop when you tell it to print(i) it gives you None because "i" itself has no value
7th Jan 2023, 7:44 PM
Ali M
Ali M - avatar