zip_longest without fillvalue
<p>I am searching for a middle ground between Python's <code>zip</code> and <code>zip_longest</code> functions (from the <em>itertools</em> module), that exhausts all given iterators, but does not fill in anything. So, for example, it should transpose tuples like so:</p>

<pre class="lang-py prettyprint-override"><code>(11, 12, 13    ),        (11, 21, 31, 41),
(21, 22, 23, 24),  --&gt;   (12, 22, 32, 42),
(31, 32        ),        (13, 23,     43),
(41, 42, 43, 44),        (    24,     44)
</code></pre>

<p><sub><sup>(Spaces added for nicer graphical alignment.)</sub></sup></p>

<p>I managed to compose a crude a solution by cleaning out the <code>fillvalue</code>s after <code>zip_longest</code>.</p>

<pre class="lang-py prettyprint-override"><code>def zip_discard(*iterables, sentinel = object()):
    return map(
            partial(filter, partial(is_not, sentinel)), 
            zip_longest(*iterables, fillvalue=sentinel))
</code></pre>

<p>Is there a way to do this without introducing the sentinels to begin with? Can this be improved using <code>yield</code>? Which approach seems most efficient?</p>