Use cases for Python Generator Functions

  1. Large datasets that might not fit into memory
  2. Complex function that needs to maintain internal state, but not complex enough to merit it’s own class

Last update : 16 octobre 2023
Created : 21 septembre 2023