with / Context Manager (Python)

The with statement sets up and automatically cleans up a resource, such as a file, even if an error happens.