Introduction to generators and yield
You already know how to build a list inside a function and return it. Generators are functions that hand back values one at a time, on demand, using yield. This lesson shows what changes when you swap return for yield.