Skip to content
CodeItRaw
Code Reading
/
Most Common Word
Path
Play
Daily
Leaderboard
tr
Bug Hunt
Most Common Word
It should return the most frequent word. The dictionary fills up, but the counts never grow. Click the buggy line and pick its kind.
Click the line you think is wrong.
1
def
most_common
(words):
2
counts = {}
3
for
w
in
words:
4
counts[w] =
1
5
return
max
(counts, key=counts.get)