Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
max-count solution in Clear category for The Most Wanted Letter by bryukh
import string
def checkio(text):
"""
We iterate through latyn alphabet and count each letter in the text.
Then 'max' selects the most frequent letter.
For the case when we have several equal letter,
'max' selects the first from they.
"""
text = text.lower()
return max(string.ascii_lowercase, key=text.count)
Feb. 14, 2014
Comments: