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.
- right answers
- arguments left as they should be
- without Counter, collections
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.