yield (Python)

yield is the keyword that turns a function into a generator. It hands back a value and pauses the function, resuming from the same spot the next time a value…