izip_longest with looping instead of fillvalue
<p>Not sure how to look around for this, but from <code>itertools</code> the function <a href="http://docs.python.org/library/itertools.html#itertools.izip_longest" rel="nofollow">izip_longest</a> does this:</p>

<p><code>izip_longest('ABCD', 'xy', fillvalue='-')</code> --> <code>Ax By C- D-</code></p>

<p>I was hoping an iterable library would have something to do this:</p>

<p><code>izip_longest_better('ABCDE', 'xy')</code> --> <code>Ax By Cx Dy Ex</code></p>

<p>Preferably for an arbitrary number of iterables, being used to generate millions of combinations.  I'll write my own, but I figured I'd ask, since I'm sure my own won't be very pythonic.</p>

<p>Awesome, It was the cycle that I hadn't tried.  I was also able to get something working by nesting for loops on arrays instead of iterators, but this is much better.  What I finally used was this to handle similar to izip"</p>

<p>EDIT:
Ended up with</p>

<pre>def izip_longest_repeat(*args):
    if args:
        lists = sorted(args, key=len, reverse=True)
        result = list(itertools.izip(*([lists[0]] + [itertools.cycle(l) for l in lists[1:]])))
    else:
        result = [()]
    return result
</pre>
