Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import collections
- c = collections.Counter()
- print 'Initial :', c
- c.update('abcdaab')
- print 'Sequence:', c
- c.update({'a': 1, 'd': 5})
- print 'Dict :', c
- # the count values are increased rather than replaced
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement