Also, for the 'Aaaooo!!!!' test, it is working properly in the 'try it' section but not in the 'check and run' section.
def checkio(text):
text = text.lower()
mwl = {}
for letter in text:
if letter not in mwl:
mwl[letter] = 1
else:
mwl[letter] += 1
for letter in sorted(mwl, key = mwl.get, reverse = True):
if letter.isalpha():
letter = sorted(list(letter))
return letter[0]
Created at: 2014/03/10 19:26; Updated at: 2014/03/10 20:39