Please, post full traceback you get, in error tags. There is something else, because your code works:
the second code works
the second code works
words = dict() token:str = "acto" words[token] = ["coat"] words[token].append("taco") print(words)
Output:{'acto': ['coat', 'taco']}
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs