What is Exception in Python? Write a block of statement that handles exception
in Python.
Answers
Answered by
6
Answer:
In Python, exceptions can be handled using a try statement. ... But if any exception occurs, it is caught by the except block (first and second values). Here, we print the name of the exception using the exc_info() function inside sys module. We can see that a causes ValueError and 0 causes ZeroDivisionError .
Hope it helps u
Similar questions