Python Exceptions 101 – Real Python

An Introduction to Python Exceptions

Mahdi Yusuf

Learn the proper handling of Python exceptions as well as protecting yourself from when things go wrong. You’ll also learn about how to clean up, after an exception occurs, as well as defining your own exception types when the need arises.

Python Exceptions

3 Lessons 12m

Mahdi Yusuf Mahdi Yusuf

Mahdi is the CTO of Gyroscope, the co-founder of the PyCoder’s Weekly, and a longtime Pythoneer.

» More about Mahdi


Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Adriana Cutenco

Joanna Jablonski

« Browse All Courses