with / Context Manager (Python)

The with statement sets up and automatically cleans up a resource, such as a file, even if an error happens. The object it manages is called a context manager.