JPMorganChase interview question

How do you process huge file with not enough memory available.

Interview Answer

Anonymous

14 Jun 2019

Generators can be used to process a huge file with not enough memory available. The normal function will create an entire sequence in memory before returning result while Generator produces one item at a time.