Test 1 2 3 4 5 6 7 8 tuple_test = () assert not tuple_test list_test = [] assert not list_test dict_test = {} assert not dict_test Summary 根据实验结果可知,直接通过: 1 if not xxx: 即可判断 tuple、list、dict 是否 为空 。