Iterate over file lines using for loop.

`for line in f` treats the file object `f` as an iterable, which
automatically uses buffered IO and memory management so you don't have
to worry about large files or use a `while` loop.