Introduction to Python Exceptions

Darren Jones
Darren Jones 3 Lessons 13m basics python

A Python program terminates as soon as it encounters an error. In Python, an error can be a syntax error or an exception. In this course, you will see what an exception is and how it differs from a syntax error. After that, you will learn about raising exceptions and making assertions. Then, you’ll finish with a demonstration of the try and except block.

What’s Included:

About Darren Jones

With 20 years as a teacher of music technology, Darren is keen to bring his skills to the Python table.

» More about Darren

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:

Participant Comments

Avatar image for Kumaran Ramalingam

Kumaran Ramalingam on June 13, 2021

Thank you so much Darren Jones: I believe in learning basics to the core would be the first best step we have to do on any technology. once we know it we can crack it. I am an Automation Developer working on infrastructure layer required more Error handlings and exceptions on case to case. Thanks for making me easily understand this tricky concept in Python. I will start from here.

Avatar image for L Pedigo

L Pedigo on April 20, 2021

This is a good lesson and I understood the material well once finished. I had been watching/reading other courses on this subject (try, except, assert) and was still not clear on how to use them. This course was way easier to understand! Very well structured and presented. Thanks for your efforts!

Avatar image for Abderraouf Z

Abderraouf Z on Nov. 21, 2020

Great course! Very good explanations.

Avatar image for rklyba

rklyba on July 5, 2019

Thank you.It’s very simple and clear. Now I gonna read “Python Exceptions: An Introduction”

Avatar image for Peter T

Peter T on March 31, 2019

Great class, albeit, very short, even though it seemed to cover all of the features of Exceptions in an extremely clear & succinct way. I look forward to seeing more courses by Darren.

Avatar image for andrewcheryl

andrewcheryl on March 26, 2019

Super helpful and clear!

Avatar image for Chaitanya

Chaitanya on March 21, 2019

A nice way of explaining the introduction part about try, except, else, finally

Avatar image for Blaise Pabon

Blaise Pabon on March 19, 2019

Now I realize that I never really understood try, catch, finally.

Avatar image for Daniel

Daniel on March 18, 2019

Great videos. Very helpful.

Avatar image for Anonymous

Anonymous on March 16, 2019

Very helpful. Straight to the point!

Avatar image for Anonymous

Anonymous on March 15, 2019

Really helpful! I can use what I learned today!

Avatar image for Paul

Paul on March 15, 2019

Well done. Good, clear, concise overview.

« Browse All Courses