In Python, "
NoneType" is the data type for the built-in constant "
None" (which implies absence of value).
None is the only instance of the
print(type(None)) # <class 'NoneType'>
NoneType is not available in some versions of Python (as noted below):
- Python 2.7:
NoneTypeis defined as a type in the types module;
- Python 3.0 - 3.9:
NoneTypeis removed from the types module (however, it's accessible via
- Python 3.10:
NoneTypeis added back to the types module.
Hope you found this post useful. It was published . Please show your love and support by sharing this post.