Which THREE of the following statements about Python exception handling are correct?
The finally clause executes regardless of whether an exception occurred or not.
Why this answer
The `finally` block in Python is guaranteed to execute regardless of whether an exception occurred, was caught, or even if the `try` block contains a `return`, `break`, or `continue` statement. This ensures cleanup actions like closing files or releasing resources always run.
Exam trap
The PCEP exam often tests the misconception that a `finally` block requires an accompanying `except` block, or that a `try` block must always have at least one `except` block, when in fact `try-finally` alone is valid Python syntax.