Passing values to generators and yield
The following example shows the passing of a value to a generator function, just like any other function. It also illustrates the passing of the value from the next() method. This allows the passing of values between generator and controlling code.