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 lancelote
from collections import Counter
def checkio(text):
# Remove all non-alphabet characters
text = ''.join(char.lower() for char in text if char.isalpha())
# Count letters
letters_count = Counter(text).most_common()
# Find most common letters
most_common = filter(lambda x: x[1] == letters_count[0][1], letters_count)
# Return alphabetically first most common letter
return min(most_common)[0]
Aug. 6, 2015