Is it possible to append elements to a python generator?
I\'m currently trying to get all images from a set of disorganized folders and write them to a new directory
You are looking for itertools.chain. It will combine multiple iterables into a single one, like this:
>>> import itertools >>> for i in itertools.chain([1,2,3], [4,5,6]): ... print(i) ... 1 2 3 4 5 6