English

When will the else part of try-except-else be executed? -

Advertisements
Advertisements

Question

When will the else part of try-except-else be executed?

Options

  • always

  • when an exception occurs

  • when no exception occurs

  • when an exception occurs into except block

MCQ

Solution

when no exception occurs

Explanation:

If there is no exception, the else portion is carried out.

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

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.