Concept Flow - With statement execution flow
Enter with statement
Call __enter__ method
Assign __enter__ result to variable
Execute block inside with
Exit block
Call __exit__ method
Handle exceptions if any
Exit with statement
The with statement calls __enter__ to start, runs the block, then calls __exit__ to clean up, even if errors happen.