How to create word frequency lists in Python

A few weeks ago I introduced my students to the notion of dictionaries in python. The obvious way of teaching them, especially in the context of my module, is to use dictionaries to create word frequency lists. In order to make the students understand better why dictionaries are useful, we discussed other ways to produce frequency lists which use only lists. This prompted me to try to think as many ways as possible to produce frequency lists. I also wanted to see how feasible is to use these methods.

Below you can see a notebook where I explain four main approaches used to create word frequency lists. It is stored in the same repository as the rest of materials for my python course.

Can you think of other methods to produce frequency lists? If yes, don’t forget to leave a comment.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.