Python - File Reading and Writing Strategies
Why is reading a large file line by line using a for loop over the file object more memory efficient than using readlines()?
readlines() reads all lines into a list, loading the entire file into memory.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions