Counting occurence of words in a text
def wordcount(string): dictionary = {} words =string.split() if "and" in words: words.remove("and") words.remove("the") else: for word in words: word.lower() if word not in words: dictionary[word]=0 dictionary[word]+=1 return dictionary print(wordcount("The bat smashed into my face with such force that it crushed my nose into a distorted U-shape. The collision sent the soft tissue of my brain slamming into the inside of my skull. Immediately, a wave of swelling surged throughout my head. In a fraction of a second, I had a broken nose, multiple skull fractures, and two shattered eye sockets.")) Can someone pls help me find the mistake in this code???