I have two iterators, a list and an itertools.count object (i.e. an infinite value generator). I would like to merge these two into a resulting ite
list
itertools.count
I prefer this other way which is much more concise:
iter = reduce(lambda x,y: itertools.chain(x,y), iters)