38votes
1answer
1686views
How to use context managers (with statement) in Python
I see "with" statements used in Python. What are context managers and how do I create my own?