Python fastest way to read a large text file (several GB) [duplicate]
with open(<FILE>) as FileObj: for lines in FileObj: print lines # or do some other thing with the line...
will read one line at the time to memory, and close the file when done...