code works on all the asserts solutions but doesn't work on "Lorem ipsum dolor sit amet" for some reason it adds "o's" that aren't there (if that makes any sense). i have been working on this for a couple of days and still haven't figured it out. need help....
def checkio(text):
lowertext = text.lower()
newtext = {}
for i in lowertext:
if i == " " or i == "!":
continue
elif not i in newtext:
newtext[i] = 1
else:
newtext[i] += 1
return max(newtext.iterkeys(), key=(lambda key: newtext[key]))[0]
Created at: 2014/11/24 21:46; Updated at: 2014/11/28 22:34