Python Developer — Medium
Key points
- The code handles a ZeroDivisionError using a try-except block
- The value of x is set to -1 in the except block
- The finally block always executes, printing the final value of x
Ready to go further?
Related questions
