In Python, the ‘null’ object is the singleton None
.
To check if something is None
, use the is
identity operator:
if foo is None:
...
More Related Contents:
- Saving and loading multiple objects in pickle file?
- Why is `object` an instance of `type` and `type` an instance of `object`?
- Null object in Python
- How to check if an object has an attribute in Python?
- How to check if an object has an attribute?
- In Python, when are two objects the same?
- a pythonic way of doubling consecutive binary bits [closed]
- How to display position of an element in an array? [closed]
- User input integer list [duplicate]
- How to make Firefox headless programmatically in Selenium with Python?
- How do I .decode(‘string-escape’) in Python 3?
- Subprocess.Popen: cloning stdout and stderr both to terminal and variables
- Lag when win.blit() background pygame
- Elegant way to check if a nested key exists in a dict?
- Installing scipy in Python 3.5 on 32-bit Windows 7 Machine
- Schedule a repeating event in Python 3
- How to melt 2 columns at the same time?
- Why is there no xrange function in Python3?
- Get all keys of a nested dictionary [duplicate]
- Configure Django and Google Cloud Storage?
- Why isn’t .ico file defined when setting window’s icon?
- How to capitalize the first letter of every sentence?
- Printing result of the zip() function in Python 3 gives “zip object at ” [duplicate]
- Attempt to call an undefined function glutInit
- Is there a way to get a line number from an ElementTree Element
- Python making combined bar and line plot with secondary y-axis
- What is the difference between super() with arguments and without arguments?
- Issue with regex backreference in Python
- How do I change the volume of the sound or music in PyGame?
- What difference between pickle and _pickle in python 3?