判断两个列表是否相等 import operator list_1 = [1, 2, 3, 4, 5] list_2 = [5, 6, 7, 8, 9] list_3 = [1, 2, 3, 4, 5] print(operator.eq(list_1, list_2)) print(operator.eq(list_2, list_3)) print(operator.eq(list_1, list_3)) 分析:返回Bool型,当两个列表完全相等,才会返回True。