How can I merge two different generators, in a way that in every iteration, a different generator will get yield?
>>> gen = merge_generators_in_between("ABCD","12")
>>> for val in gen:
... print val
A
1
B
2
C
D
How can I achieve this? I didn’t find a function for it in itertools.
Look in the
itertoolsrecipes under round robin: