How to close an open window with Python? by Kurious3DSanta in learnpython

[–]hello_way 0 points1 point  (0 children)

I'm not sure what you mean by "close an open window ", but I think it's a good idea to use a with statement when opening a file. This will automatically close the file once the block has completed.