Beginner Python
Q22 / 101

How do you handle exceptions in Python?

Correct! Well done.

Incorrect.

The correct answer is B) try: ... except ExceptionType:

B

Correct Answer

try: ... except ExceptionType:

Explanation

Python uses try/except for exception handling, with optional else (no exception) and finally (always runs) blocks.

Progress
22/101