PRACTICE / UNDERSTAND / REPEAT
Python practice question
Practice exceptions with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
Which clause runs only when the `try` block raises no exception?
Answer & explanation
Answer: else
`else` runs if no exception occurred. `finally` runs regardless of success or failure.