📜  字符串python代码示例中最常见的字母

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

代码示例2
>>> from collections import Counter
>>> x = Counter("balloon")
>>> x
Counter({'o': 2, 'a': 1, 'b': 1, 'l': 2, 'n': 1})
>>> x['o']
2