Python Generator

Generator is a one-time iterable object in Python.

Links to this page
  • yield

    yield is a keyword in Python that when used in a function, will return a 202206081814# where no code will be run. Each time when the caller extract an object from the generator, it will proceed to the remaining code of the callee until meet the next yield statement or the end of the function.

#python