mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-30 10:56:55 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
9 lines
571 B
Markdown
9 lines
571 B
Markdown
# Context Manager
|
|
|
|
Context Managers are a construct in Python that allows you to set up context for a block of code, and then automatically clean up or release resources when the block is exited. It is most commonly used with the `with` statement.
|
|
|
|
Visit the following resources to learn more:
|
|
|
|
- [@official@Context Libraries](https://docs.python.org/3/library/contextlib.html)
|
|
- [@article@Context Managers in Python](https://www.freecodecamp.org/news/context-managers-in-python/)
|
|
- [@article@Context Managers](https://book.pythontips.com/en/latest/context_managers.html) |