KeyError
if you do it on the console without the try block will tell it to you
>>> a = {}
>>> a['invalid']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'invalid'
>>>
KeyError
if you do it on the console without the try block will tell it to you
>>> a = {}
>>> a['invalid']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'invalid'
>>>