📌  相关文章
📜  计算 python 列表中的重复值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:15.425000             🧑  作者: Mango

代码示例3
a=["a","a","a","b","a","b","c","c","c","d","d",]
dic={}
for i in a:
    dic={i:a.count(i)}
print(dic)
    
#return b={i:a.count(i) for i in a}