>>> from collections import Counter
>>> c1 = Counter([11,22,33,33])
>>> c1
Counter({33: 2, 11: 1, 22: 1})
>>> c1-Counter([22,33])
Counter({11: 1, 33: 1})
>>> Counter(a=2, bb=3)
Counter({'bb': 3, 'a': 2})
>>> list(Counter(a=2, bb=3))
['a', 'bb']
>>> Counter(a=2, bb=3).elements()
<itertools.chain object at 0x0000000018831700>
>>> list(Counter(a=2, bb=3).elements())
['a', 'a', 'bb', 'bb', 'bb']
>>> Counter('abbccaddd')
Counter({'d': 3, 'a': 2, 'b': 2, 'c': 2})
>>> Counter('abbccaddd').most_common()
[('d', 3), ('a', 2), ('b', 2), ('c', 2)]
>>> Counter('abbccaddd').most_common(2)
[('d', 3), ('a', 2)]
>>>
>>> {Counter('abbccaddd')}
TypeError: unhashable type: 'Counter'
>>> dict(Counter('abbccaddd'))
{'a': 2, 'b': 2, 'c': 2, 'd': 3}
>>>
>>> c1 = Counter(aa=11, bb=22)
>>> c2 = Counter(bb=10, cc=30)
>>> c1+c2
Counter({'bb': 32, 'cc': 30, 'aa': 11})
>>> c1-c2
Counter({'bb': 12, 'aa': 11})
>>> c1&c2
Counter({'bb': 10})
>>> c1|c2
Counter({'cc': 30, 'bb': 22, 'aa': 11})
>>>
>>>
>>> c1 = Counter(a=11, bb=22)
>>> c1.subtract(Counter(bb=1,cc=10))
>>> c1
Counter({'bb': 21, 'a': 11, 'cc': -10})
>>>