you could potentially use it iterate thru a loop at different points and time. it could defer handling the next element.
when you use it in a for each loop, I don't think there is an actual difference.
but the generator has some methods like next() that lets you control when to handle the next item in the collection, here is a silly test
drive.google.com/file/d/1CCLP2SWMNAX1xuDCV1B3vMrB2DwWe0_2/view
where I have used these in the past, is for a card game, I have a deck data structure that had a generator function to return the elements, and i would just call deck.next() to get the next card. but this could also be accomplished using a stack or a queue with pop/dequeue,
where generator excel is the value it returns is lazily evaluated so it's more memory efficient. instead of pulling the entire set in memory it only pull the elements its retrieved