[python] Remove an item from a dictionary when its key is unknown