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 anieruth
def checkio(text: str) -> str:
text = text.lower()
mass = {l: text.count(l) for l in set(text) if l.isalpha()}
let, _ = min(mass.items(), key = lambda i: (-i[1], i[0]))
return let
# These "asserts" are used for self-checking
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!")
Oct. 21, 2025
Comments: