python-skills 发表于 2019-05-28 | 本文字数: 146 一些常用的Python技巧 字典 添加元素,统计次数 12345string = 'abbccc'count = {}for i in string: count[i] = count.get(i, 0) + 1print(count) numpypandas