A / An_________ block will be executed only if exception is raised in the try block, in Python.
A / An_________ block will be executed only if exception is raised in the try block, in Python.
Solution
✅ Correct Option: 4
The except block runs only when an exception is raised in the try block. Python then matches the exception to an except clause and runs its code.
Option 1: else runs only when the try block raises no exception, which is the opposite of the question.
Option 2: catch is used in Java and C++, but it is not a Python keyword.
Option 3: finally runs every time, whether or not an exception occurs.
Related questions:
2026: 24 May Shift 1
2026: 23 May Shift 2
2026: 31 May Shift 1