Python | Exception Handling quiz | Question 5

Last Updated :
Discuss
Comments

What will be the output of the following code?

try:
   result = 10 / 0
except ZeroDivisionError:
   result = "Infinity"

print(result)
 

10

"Infinity"

ZeroDivisionError

None

Share your thoughts in the comments