Ever curious whether open()
and with open()
in python mean the same thing? Recently, I found the explanation at Understanding Python’s “with” statement. Basically, using with
statement just ensures that you don’t forget to close()
the file.
Ever curious whether open()
and with open()
in python mean the same thing? Recently, I found the explanation at Understanding Python’s “with” statement. Basically, using with
statement just ensures that you don’t forget to close()
the file.