Intermediatehow it works
What are generators, and why do they matter for big data?
Source: Python tutorial: data structures
Quick answerFree
A generator function uses yield to produce values one at a time and pauses between them, so only the current item is in memory. Chaining generators (read → filter → batch → load) processes a file of any size with constant memory.
Detailed answer· 67 words
Interview PrepUnlock the full answer with Interview Prep
Get a 67-word model answer, 4 key points and a visual explainer, plus 233 more Python questions.
Also in Pro (₹499 / 90 days).
Key points· 4 points
Interview PrepUnlock with Interview Prep
Visual explainer· animated, step by step
Interview PrepUnlock with Interview Prep
+ 233 more Python questions in Interview Prep, each with the full answer.