Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: count words

Given a file count how many times each word appears. Have two implementations. One using two list and one using a dictionary. Profile the code and benchmark the two solutions.

See examples/perf/count_words_two_lists.py and examples/dictionary/count_words.py