The with statement in Python is one of the most elegant and useful features of the language — but also one of the least understood by beginners. Many developers have used with open(...) without realizing what's happening behind the scenes.
This is th...