LearnPy Hub
← Modules & the Standard Library problems
Easy

Top Letters

Read a word and print its 3 most common letters with counts, as returned by Counter.most_common(3).

Input

One word.

Output

A list of tuples.

Sample 1

Input
mississippi
Output
[('i', 4), ('s', 4), ('p', 2)]

Sample 2

Input
banana
Output
[('a', 3), ('n', 2), ('b', 1)]
solution.py
Output appears here
Top Letters · Python practice problem · LearnPy Hub