Python | String similarity metrics

How to read a large file - line by line?