5. Using Generator function
A yield (“return”) for
every iteration, so it can
be used immediately
without temp data structure
== GOOD!
6. Using Generator function
A yield (“return”) for
every iteration, so it can
be used immediately
without temp data structure
== GOOD!
So, this is the
generator function
7. Using Generator function
A yield (“return”) for
every iteration, so it can
be used immediately
without temp data structure
== GOOD!
So, this is the
generator function
… which can be
iterated over, like this ...