Combining Generators
using the yield method to combine multiple sequences in one iterable
It is possible to combine two sequences in one iterable. All you need to do is use yield*
to include an iterable, which will enumerate all of its values one by one.
Yield* delegates iteration to another generator or iterable object.
Get hands-on with 1400+ tech skills courses.