Files
syno-scripts/Python/UdemyPythonIntro-master/Chapter4_Intermediate/Exceptions.py
T

11 lines
144 B
Python
Executable File

dct = {"Jan": 27, "Peter": 33}
lst = [1, 2, 3]
try:
print(lst[3])
except KeyError as e:
print(e)
except IndexError as e:
print(e)