Python中对应于'null'的是什么?
if foo is None:
...>>> foo is None
True
>>> foo = 'bar'
>>> foo is None
Falseif not (val is None):
# ...None的详解
None的详解>>> NoneType
NameError: name 'NoneType' is not defined
>>> type(None)
NoneType参考
Last updated