Python Pop Quiz 1 - Exceptionally Crazy
What will be the output if you run this code?
A) Outer ZeroDivisionError exception caught
B) Error: You divided by zero!
C) Error: You divided by zero! Finally executed
D) Finally executed
E) None of the above
This tutorial is an excerpt from my book, The Python Quiz Book
The Answer
D) Finally executed
Explanation
This code causes the ZeroDivisionError to be …
Keep reading with a 7-day free trial
Subscribe to The Python Papers to keep reading this post and get 7 days of free access to the full post archives.


