python not的用法

在python中 None, False, 空字符串"", 0, 空列表[], 空字典{}, 空元组()都相当于False ,即:not None == not False == not '' == not 0 == not [] == not {} == not () not = !
posted on 2022-12-01 14:16  NLazyo  阅读(68)  评论(0编辑  收藏  举报