【Python】計算list中各個元素出現的頻率

#方法一web from collections import Counter list = [59, 138, 13, 1367, 158, 35, 572, 43, 10, 34, 572, 572, 44, 12, 1345, 7, 21, 59, 10] list.sort() counter = Counter(list) print(counter) output:svg Coun
相關文章
相關標籤/搜索