Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Counter in python

from collections import Counter
strl = "aabbaba"
print(Counter(str1))

Counter({'a': 4, 'b': 3})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Counter #python
ADD COMMENT
Topic
Name
1+8 =