Skip to content

Dictionaries · stretch

Most common word

Write most_common(words) returning the word that appears most often in the list. If several tie, return the one that appears first in the list. The list is never empty.

Run adds print(most_common(["a", "b", "a"])) after your code, to try it.

Stuck on the idea rather than the code? The Dictionaries lesson walks through it.