Python - Exception Handling Fundamentals
What will be printed when this code runs?
try:
result = 10 / 0
except Exception:
print('Exception handled')try:
result = 10 / 0
except Exception:
print('Exception handled')ZeroDivisionError, which is a subclass of Exception.except Exception: block catches this error and executes the print statement.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions