如何統計序列中元素出現的頻度

相關案列:某序列data=【1,3,4,5,3,4,5,3,5,6,4,6,8,9,0,4,6,7,8,9,544,2】中,找出出現次數最高的3個元素 ,他們出現次數是多少? from  collection import Counter c=Counter(data) c,most_common(3) 對字典學生成績進行排序d={ 'lilei':88,'liming':89,'dengqian
相關文章
相關標籤/搜索