English

While handling exceptions in Python, name of the exception has to be compulsorily added with except clause.

Advertisements
Advertisements

Question

While handling exceptions in Python, name of the exception has to be compulsorily added with except clause. 

Options

  • True

  • False

MCQ
True or False
Advertisements

Solution

The statement is False.

Explanation:

The except block does not require the exception name to be specified.

shaalaa.com
  Is there an error in this question or solution?
2023-2024 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×