Quiz

Iterators vs Iterables in the Data Model

Understanding how __iter__ and __next__ define iterators versus iterables and why generators exhaust once.

You have a generator `g = (x*x for x in range(3))`. What happens when you do `list(g)` followed immediately by a second `list(g)`?