DEV Community

Discussion on: X-Mas Wisher in python

Collapse
 
morphzg profile image
MorphZG • Edited

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
 
sehgalspandan profile image
Spandan Sehgal

Thanks for the suggestion

Have a good day