1 列表判空 if ls: print('not empty') if not ls: print('empty') 2 [], (), {}, 0, False. 都是false== 比较值,前提是哈希值相等is 比较类型 3 https://docs.python.org/zh-cn/3.7/library/stdtypes.html#comparisons https://docs.python.org/3.7/reference/datamodel.html#object.hash