Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

most common letter in string python

>>> from collections import Counter
>>> x = Counter("balloon")
>>> x
Counter({'o': 2, 'a': 1, 'b': 1, 'l': 2, 'n': 1})
>>> x['o']
2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #common #letter #string #python
ADD COMMENT
Topic
Name
9+3 =