English

The else part of try-except-else executes: -

Advertisements
Advertisements

Question

The else part of try-except-else executes:

Options

  • Irrespective of whether an exception occurs or not

  • When an exception is encountered

  • When no exception is not encountered

  • When code of except block is executed

MCQ

Solution

When no exception is not encountered

Explanation:

Finally, when no exception is encountered, the try-except-else statement is executed.

shaalaa.com
Handling Exceptions
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×