How is a generator different from a regular iterator, and what actually happens on yield? Tell me about send and yield from — where have you used them?
~4 min by voice
How to approach it
They're checking whether you understand the mechanics of generators beyond "a function with yield": the iterator protocol, frame suspension, two-way communication via send/throw, delegation via yield from, and finalization. Plus whether you have real hands-on experience, not just a retelling of the docs.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.