After seeing the difference between syntax errors and exceptions, you learned about various ways to raise, catch, and handle exceptions in Python.
In this course, you explored how to:
- Differentiate exceptions from syntax errors
- Use the
assert
keyword to check if a certain condition is met - Write custom exceptions that subclass
Exception
- Catch exceptions with a
try
…except
block - Use the additional keywords
else
andfinally
- Catch built-in exceptions
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
aniketbarphe on Dec. 25, 2021
Thank You!