What does the "yield" keyword do?
When you see a function with yield statements, apply this easy trick to understand what will happen:
1. Insert a line result = [] at the start of the function.
2. Replace each yield expr with result.append(expr).
3. Insert a line return result at the bottom of the function.