100DaysofCode – Day 5

On day 5 of the #100DaysofCode challenge in Python

Python does cool things with collections.

For those of you who’ve done it in other languages:

 most_common = Counter(word_list).most_common(3)

will return a list of tuples with a word and count. Yeah, it really is that easy and cool.

Leave a Reply

Your email address will not be published. Required fields are marked *