Exercise 3: The Most Frequent Letters

Discover the most frequently used letters in a text.

We'll cover the following

Problem statement

Given text as a string, use the Counter class to find and report the three most frequent letters in that text as three space-separated characters. Treat the letters in a case-independent way.

Task

Use the Counter class to print a list of the three most frequent letters in a human-readable way (separated by three spaces). Note that only letters should be counted, not other symbols!

Example

For the text, "Mary had a little lamb", the program should report "a l m".

Get hands-on with 1400+ tech skills courses.