import string defworldcount(text:str) -> dict: a = {} punctuation_to_remove = string.punctuation translator = str.maketrans('', '', punctuation_to_remove) no_punctuation = text.translate(translator) lowercase_text = no_punctuation.lower() lowercase_text = lowercase_text.split() for i in lowercase_text: if i notin a: a[i] = 1 else: a[i] += 1 return a text = """ Got this panda plush toy for my daughter's birthday, who loves it and takes it everywhere. It's soft and super cute, and its face has a friendly look. It's a bit small for what I paid though. I think there might be other options that are bigger for the same price. It arrived a day earlier than expected, so I got to play with it myself before I gave it to her. """ result = worldcount(text) print(result)