from collections import Counterprint(Counter(('foo', 'bar', 'foo')))
Standard input is empty
Counter({'foo': 2, 'bar': 1})
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!