Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Most Wanted Letter by lisovsky
import string
from collections import Counter
def checkio(text: str) -> str:
lst = [c for c in text.lower() if c in string.ascii_lowercase]
lst.sort()
return Counter(lst).most_common(1)[0][0]
print("Example:")
print(checkio("Hello World!"))
assert checkio("Hello World!") == "l"
assert checkio("How do you do?") == "o"
assert checkio("One") == "e"
assert checkio("Oops!") == "o"
assert checkio("AAaooo!!!!") == "a"
assert checkio("abe") == "a"
print("The mission is done! Click 'Check Solution' to earn rewards!")
Sept. 25, 2022