HOWTO: read a huge file with low memory usage in python

less than 1 minute read

import fileinput  

for line in fileinput.input(['myfile']):  
    do_something(line)

Tags:

Categories: ,

Updated:

Leave a Comment