Lazy PowerGenerators & yield
All courses

Lazy sequences that save RAM

yield turns a function into a generator — it produces values one at a time instead of building a giant list.

Quirk: Generators are single-use iterators. Iterate twice and the second time gives you nothing — like a vending machine that already ate your dollar.

Output
Press Run to execute your code.