Python Programming - Exception Handling - Discussion

Discussion Forum : Exception Handling - General Questions (Q.No. 6)
6.
What does the try and except blocks in Python exception handling allow you to do?
Define custom exception classes
Raise exceptions intentionally
Handle and catch exceptions
Terminate the program
Answer: Option
Explanation:
The try block is used to enclose code that might raise an exception, and the except block is used to handle and catch the raised exceptions.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.