हिंदी

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

Advertisements
Advertisements

प्रश्न

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

विकल्प

  • always

  • when an exception occurs

  • when no exception occurs

  • when an exception occurs into except block

MCQ
Advertisements

उत्तर

when no exception occurs

Explanation:

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

shaalaa.com
Handling Exceptions in Python
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×