False 不同,它不表示 0,也不表示空字符串,而表示没有值,也就是空值。 None 有自己的数据类型,我们可以在 IDLE 中使用 type() 函数查看它的类型,执行代码如下:
>>> type(None) <class 'NoneType'>
None的定义如下:
class NoneType(object) | Methods defined here: | __bool__(self, /) | self != 0 | | __repr__(self