Handling Exceptions

In this lesson, you'll learn how to handle exceptions in Python.

Introduction to error handling

Errors happen. A program may try to divide a number by zero, send a message to None, or read in a file that isn’t there. When this happens, Python will raise an exception.

Get hands-on with 1200+ tech skills courses.