When does the else block of a try statement run in Python?
Correct answer
C. When no exception was raised in try
5 views
C. When no exception was raised in try
5 views
The else clause executes if the try block did not raise.
Asked in: Python Interview Exception Handling
https://docs.python.org/3/tutorial/errors.htmlNot sure why the answer is C? Ask here and get an explanation.