1. Home
  2. Data Science
  3. Python
  4. When does the else block of a try statement run in Python?

Added 25 Nov 2026

When does the else block of a try statement run in Python?

  1. When an exception occurred
  2. Always
  3. When no exception was raised in try Correct answer
  4. Never

Correct answer

C. When no exception was raised in try

5 views

MCQSEXAM

Explanation

The else clause executes if the try block did not raise.

Reference

Asked in: Python Interview Exception Handling

https://docs.python.org/3/tutorial/errors.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs