For Instance: data = {'1': '一', '2': '二', '3': '', '4': '四'} # 注意,键为3的值是空的。 test = data.get('1') and data.get('2') and data.get('3') and data.get('4') if test: # 因为data.get('3')的值是空的,所以数据不完整 print(True) else: print(False) >>>> False 用于不知道字典中的数据变化,而某种场合必须的字段,必须的字段为空则data不存在。