3 ms·
In the vein of http://xkcd.com/353/ http://xkcd.com/353/ : >>> from collections import Counter >>> Counter("here are some words here are".split()).most
by Shish2k 13y ago
In the vein of http://xkcd.com/353/ http://xkcd.com/353/ :
>>> from collections import Counter
>>> Counter("here are some words here are".split()).most_common(3)
[('are', 2), ('here', 2), ('words', 1)]