示例:返回booleanli = [] li = {} li = () if not li: print(1) radiansdict.has_key(key) #如果键在字典dict里返回true,否则返回false 示例所有的数据类型都自带布尔值,数据只有在0,None和空的时候为Falseprint(bool())print(bool())print(bool(''))print(bool(' '))print(bool(0))print(bool(None))print(bool(Fal…