Notes on bioinformatics and data mining by G. Corey Shan
open() vs with open() in python
~1 min read
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.