4 ms·
In Python, "if there exists some X" would be more like if x is not None: In Python, [] (empty list) and {} (empty dict) are == False but are not None. Th
by kyllo 12y ago
In Python, "if there exists some X" would be more like
if x is not None:
In Python, [] (empty list) and {} (empty dict) are == False but are not None. They exist, and their types are List and Dict rather than NoneType, but they are "falsey" because they are empty.