I need to read a large file, line by line. Lets say that file has more than 5GB and I need to read each line, but obviously I do not want to use readlines() bec
readlines()
f=open('filename','r').read() f1=f.split('\n') for i in range (len(f1)): do_something_with(f1[i])
hope this helps.