Picks up where Count words left off.
You counted words into a dict. Now return the most frequent word; on a tie, the one that is lexicographically smallest.
Write top_word(s).
Starter:
def top_word(s):
# TODO
pass
Solve it interactively in your browser (no setup), check your answer instantly, and keep your daily streak going on IWTLP: https://iwtlp.com/challenge
Top comments (0)