• code doesn't work!!!!

Question related to mission The Most Wanted Letter

 

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]