If I have a generator that sequentially returns items in a list, is there any way to make the first return something different? e.g. if the list is ['apple', 'bag', 'cat', 'dog'...]
, could I make the generator yield
'apple is the first item'
'bag'
'cat'
'dog'
etc?
For some context: I am trying to stream a large file through flask using a generator object.