+ 5

Why there is None execute,explain me

Hi everyone x=print('sololearn') print(x) output is= sololearn None why None is execute please explain me

23rd Feb 2018, 4:44 PM
Maninder $ingh
Maninder $ingh - avatar
1 Answer
+ 3
Here: https://docs.python.org/3.2/library/constants.html None is frequently used to represent the absence of a value, as when default arguments are not passed to a function. x is not going to get a value assigned as print is not returning anything to the program, it just prints to the screen
23rd Feb 2018, 4:49 PM
Sergiu Panaite
Sergiu Panaite - avatar