a = [1,2,3,4,2,3,2] maxlabel = max(a,key=a.count) print(maxlabel) Mark周末:建议使用: max(set(a),key=a.count) 对大量数据速度快