English

While handling exceptions in Python, name of the exception has to be compulsorily added with except clause. - Computer Science (Python)

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

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 (February) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×