Context Managers In Python
Jul 24, 2017 · 1 min read
Context managers are inherent feature of python to provide a way to obtain and release resources on demand.
When a context manager is used, a definite scope is defined to safely delete or clean resources.
For example a file can be read in below two ways.
https://gist.github.com/anaved/437ed10fa2c2a4f3252e715aa2f2b006#file-file_read_in_context-py
