Reading and Writing Files
Know
A context manager opens a file and guarantees it is closed even if an error occurs partway through.
Apply
Always open files with a context manager, and read line by line when the file may be large.
Watch out
Reading an entire large file into memory when streaming would do.
Study move
Read a file line by line, count matching lines, and confirm the file closes on an error.
