Counter

from collections import Counter

# print(Counter("宝宝今年特别喜欢王宝强")) # 计数
# lst = ["jay",'jay',"jay","宝宝","宝宝", "胡辣汤", "上官婉儿", "上官婉儿"]
# dic = {"a":"哈哈", "b":"哈哈", "c":"车牌"}
# c = Counter(dic.values())
# print(c)

  

原文地址:https://www.cnblogs.com/work14/p/10187638.html