Exception (Python)

An exception is an error that occurs while a program is running, such as dividing by zero or accessing a missing key. If not handled, it stops the program…