Can we overwrite a key?

Please see the following as formatted code is much easier for eveyone to read- How do I format code in my posts?

The error points you to the issue, a KeyError suggests that key doesn’t exist for the dictionary.

If you look at the docs for dict.pop- Built-in Types — Python 3.9.2 documentation you’ll note that it searches for an existing key, removes that key from the dict and returns the value. Is “worst picture” an existing key? Double check what goes where.