3 ms·
Ehm, Python doesn't have a NULL: >>> NULL == 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'NULL' is not d
by X-Istence 13y ago
Ehm, Python doesn't have a NULL:
>>> NULL == 0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'NULL' is not defined
Even None, which is as close to NULL you are going to get in Python is not 0.
>>> None == 0
False
- taway2012 13y agoThis is probably what the parent meant: >>> 'truthy' if None else 'falsy' 'falsy' >>> 'truthy' if False else 'falsy' 'falsy' >>> 'truthy' if 0 else 'falsy' 'falsy'