To understand what yield
does, you must understand what generators are. And before generators come iterables.
When you create a list, you can read its items one by one, and it's called iteration:
>>> mylist =[1,2,3]>>>for i in mylist:...print(i)123