📅  最后修改于: 2022-03-11 14:46:32.850000             🧑  作者: Mango
>>> from collections import Counter
>>> z = ['blue', 'red', 'blue', 'yellow', 'blue', 'red']
>>> Counter(z)
Counter({'blue': 3, 'red': 2, 'yellow': 1})