问题描述: 直接取列表中所有元素的众数时,自己写的代码得到的结果指标很差,准确率很低,改写成库函数,准确率得到提升 from collections import Counter ... # 去掉个位数 _line =[(item // 10) *10 for item in line] numcount = dict(Counter(_line)) numcount存储了出现的编号以及对应频率 maxValue = 0 maxKey =