Python Programming - Exception Handling - Discussion

Discussion Forum : Exception Handling - General Questions (Q.No. 17)
17.
Which of the following statements is true about the try, except, and finally blocks?
The except block is mandatory if there is a finally block
The finally block is optional
The try block is optional
The except block is optional if there is a finally block
Answer: Option
Explanation:
The finally block is optional in exception handling. It can be used for cleanup operations and will be executed whether an exception occurs or not.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.