Exception Handling

An exception is a runtime error that occurs while your program is running, causing it to crash. Exception handling uses try, except, else, and finally blocks to catch these errors gracefully so your program can deal with them instead of stopping abruptly.