标签:int items counter collect ems span rom item dict
代码
from collections import Counter ll=[‘1‘,‘1‘,‘2‘,‘3‘] dic=dict(Counter(ll)) print(dic) print([k for k,v in dic.items() if v>=2])
标签:int items counter collect ems span rom item dict
原文地址:https://www.cnblogs.com/tjp40922/p/12617035.html