Home » Programming Language (coding) » Python MCQ » Which of the following blocks will be executed whether an exception is thrown or not?

Which of the following blocks will be executed whether an exception is thrown or not?

Which of the following blocks will be executed whether an exception is thrown or not?

A. except
B. finally
C. else
D. assert

Correct Answer: Option B. finally 

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
28 + 28 =