1>>> NoneType = type(None)
2>>> x = None
3>>> type(x) == NoneType
4True
5>>> isinstance(x, NoneType)
6True
1# The None keyword is effectively the same as null
2# Functions without a return will return None
3
4>>> def has_no_return():
5... pass
6>>> has_no_return()
7>>> print(has_no_return())
8None
9
10# Often, you’ll use None as part of a comparison.
11# One example is when you need to check and see if some result or parameter is None.
12
13>>> import re
14>>> match = re.match(r"Goodbye", "Hello, World!")
15>>> if match is None:
16... print("It doesn't match.")
17"It doesn't match."