Question 9/17
intermediate
Select one answer

What is the purpose of the "with" statement in Python?

To create loops
To manage resources and ensure proper cleanup (context management)
To define functions
To import modules

Premium Question

Upgrade to unlock this question and 300+ more interview prep MCQs.