हिंदी

Is the following Python code valid? try: # Do something except: # Do something finally: # Do something -

Advertisements
Advertisements

प्रश्न

Is the following Python code valid?

try:
# Do something
except:
# Do something
finally:
# Do something

विकल्प

  • no, there is no such thing as finally

  • no, finally cannot be used with except

  • no, finally must come before except

  • yes

MCQ

उत्तर

no, finally cannot be used with except

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

Englishहिंदीमराठी


      Forgot password?
Use app×