Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

counter library python

import collections

c = collections.Counter()
print 'Initial :', c

c.update('abcdaab')
print 'Sequence:', c

c.update({'a':1, 'd':5})
print 'Dict    :', c
Source by pymotw.com #
 
PREVIOUS NEXT
Tagged: #counter #library #python
ADD COMMENT
Topic
Name
4+2 =