I have generator with 3 pretty big chunks. I am creating combinations of 2 elements from it, but then in some part of code I need third part (the one not included in combinations). How should I do it? I don't need the simplest or the prettiest solution, I need the fastest solution possible.
Example:
a = ['a','b','c']
gen = chunks(a, 2) # this is not important
for x in combinations(gen, 2):
# let's say we have x = ['a','b'] and I want to get 'c'
# I know it is possible to put all generator elements in list and get 'c'
# with for loop or set, but I don't if this is the fastest way to get it