The latter is a 'compound' statement!

the 'with' statement allows the execution of
- initialization code
- finalization code
around a block of code

In the example above, when you open() a file you also need to close() the file.
I see.

Out of the two which one would you recommend that as a community we
should use?

and Why?


In fact, this is going to be a topic for discussion in the upcoming Python deep-dive session.


Okay sounds good!

Reply via email to