Part 6 of 7 · Chapter 6 of 7

The Structures Python Ships But Never Advertises

Counting how often each word appears takes four lines and one conditional that everybody eventually gets wrong. Swap in the structure built for exactly that job and watch the same tally come out of a single line.

Intermediate11 min read

Worth reading first: Looking Things Up Instead of Counting Along


Make a free account to read on

Every chapter is free — an account is how your progress, XP, and streak follow you from your laptop to your phone, and how you show up on the leaderboard. No payment, no trial.