Python - Context Managers
Why does the
with statement guarantee resource cleanup even if an error occurs inside its block?with statement guarantee resource cleanup even if an error occurs inside its block?__exit__ method is called when the block finishes, even if an error happens.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions