Question 6/13 v3 lecture 9

In Python, what happens when we say for something in something_else?


iter is called on something_else and each iteration next() is called on the returned iterator


Relevant part of lecture

supplementary material

What are coroutines? (a short youtube video)
Found coroutines interesting? Here is a great Quora answer on what continuation-passing style in functional programming is.
How does Python go about handling the StopIteration Exception?