From the official python docs: exception KeyError. Raised when a mapping (dictionary) key is not found in the set of existing keys. For example: >>> mydict = {'a':'1','b':'2'} >>> mydict['a'] '1' >>> mydict['c'] Traceback (most recent call last): File "
Key Error Keys and Dictionaries in Python. Keys in Python are associated with dictionaries. A dictionary is an unordered set of key-value pairs. read more