+ 1

What does None means in the output of a code

7th Mar 2022, 11:31 AM
Chaimae EL GUENNOUNI
Chaimae EL GUENNOUNI - avatar
4 Respuestas
+ 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
7th Mar 2022, 12:08 PM
Per Bratthammar
Per Bratthammar - avatar
+ 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
7th Mar 2022, 11:34 AM
Brave Tea
Brave Tea - avatar
+ 2
Thank u I solved it💪
7th Mar 2022, 12:17 PM
Chaimae EL GUENNOUNI
Chaimae EL GUENNOUNI - avatar
+ 1
What does None means in the output of a code
7th Mar 2022, 11:32 AM
Chaimae EL GUENNOUNI
Chaimae EL GUENNOUNI - avatar