Python · Lesson 9.2 · Pro
else and finally
Code that runs only when nothing went wrong, and code that always runs.
In this lesson
- Several kinds of error
- else: only if it worked
- finally: always runs
- Keep the try small
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.