Consider the following try… except… else… finally… instruction: try: … except: … else: … finally: … Select correct statement.

Questions & AnswersCategory: PythonConsider the following try… except… else… finally… instruction: try: … except: … else: … finally: … Select correct statement.
Lokesh Kumar Staff asked 2 years ago

Consider the following try... except... else... finally... instruction:

try:
    ...
except:
    ...
else:
    ...
finally:
    ...

 
Select correct statement.
a. The code in a finally block only executes when an exception is raised in the else block.
b. The code in a finally block is always executed regardless of the result of previous blocks.