def word_count(mystr):
    myl = mystr.lower().split()
    dic = {}
    for value in myl:
        if dic.has_key(value):
            dic[value]+=1
        else:
            dic[value]=1
    return dic
print word_count("The cat sat at the mat")