file handling (open/closecan be done by the context manager with (=section errors and exceptions on slide with open test txt as for line in print line after finishing the with block the file object is closedeven if an exception occurred inside the block member of the helmholtz association slide