What is the syntax to use the None value?

None value is used, where there is an absence of a value. You must type it with a capital N. The value is useful for instances where you need to store something that can’t be confused for a real value in a variable. Behind the scenes, Python automatically adds a “return None” statement to any function with no return statement.

None
#example
def doesNothing():
   None
doesNothing()

#output is nothing
Advertisements