Certified Entry-Level Python Programmer (PCEP-30-02) — Question 35

The unnamed except block ...

Answer options

Correct answer: C

Explanation

The unnamed except block must be the last one because it serves as a catch-all for any exceptions not handled by named blocks. Options A, B, and D are incorrect since the unnamed block cannot be the first, cannot be used with named blocks, and cannot be placed anywhere except at the end.