KnowledgeBoat Logo

Computer Science

State whether the following statement is True or False:

The finally block in Python is executed only if no exception occurs in the try block.

Python Functions

3 Likes

Answer

False

Reason — The finally block in Python is always executed after the try block, regardless of whether an exception occurred or not.

Answered By

3 Likes


Related Questions