+ 1
What does None means in the output of a code
4 Réponses
+ 4
Hi! None is an object in Python, without any methods. It denotes the lack of a value. You can use == to test if something is identically to None.
If a function doesn’t have a return statement, it is the same as it has a
return None
at the functions last line. So for example print doesn’t have a return, so when you call it, it returns None.
>>> res = print("Hello world")
Hello world
>>> print(res)
None
+ 2
It has to do with a function running but not returning something.
Also; google first next time :)
Edit: take a look here https://stackoverflow.com/questions/7053652/why-is-the-output-of-my-function-printing-out-none
+ 2
Thank u I solved it💪
+ 1
What does None means in the output of a code