Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

counter in python

import collections

print collections.Counter(['a', 'b', 'c', 'a', 'b', 'b'])
print collections.Counter({'a':2, 'b':3, 'c':1})
print collections.Counter(a=2, b=3, c=1)
Source by pymotw.com #
 
PREVIOUS NEXT
Tagged: #counter #python
ADD COMMENT
Topic
Name
5+7 =