欧2020

导航

python学习记录(四)-意想不到

计数 from collections import Counter # 计数 res = Counter(['a','b','a','c','a','b']) print(res,type(res)) # Counter({'a': 3, 'b': 2, 'c': 1}) <class 'coll

posted on 2020-12-17 18:29  欧2020  阅读(51)  评论(0编辑  收藏  举报