DEV Community

Discussion on: X-Mas Wisher in python

Collapse
morphzg profile image
MorphZG • Edited on

Always happy to find some simple programs and than try to build upon it. Some people say its best to use "with" block when opening files because it takes care of both opening and closing it. Not sure why it is important, maybe it have something with memory usage.

Edit: geeksforgeeks.org/with-statement-i...

Collapse
spandyboss profile image
SpandyBoss Author

Thanks for the suggestion

Have a good day