Python Types
Python 有许多内置类型。文档 The Python Standard Library > Built-in Types。
假值
len([]) == 0 # empty sequence
len({}) == 0 # empty mapping
x = 1
type(x) # int
None
None 是 NoneType 的唯一的值
if (x is not None)
Python 有许多内置类型。文档 The Python Standard Library > Built-in Types。
len([]) == 0 # empty sequence
len({}) == 0 # empty mapping
x = 1
type(x) # int
None 是 NoneType 的唯一的值
if (x is not None)