(seq: Iterable)
return tuple(itertools.starmap(itertoolz.pluck, enumerate(seqs)))
Borrowed from ``toolz.sandbox.core.unzip``, but using cytoolz instead of toolz
    to avoid the additional dependency.
Borrowed from ``toolz.sandbox.core.unzip``, but using cytoolz instead of toolz
    to avoid the additional dependency.
Borrowed from toolz . sandbox . core . unzip but using cytoolz instead of toolz to avoid the additional dependency .
def unzip(seq: Iterable) -> Tuple:
    """
    Borrowed from ``toolz.sandbox.core.unzip``, but using cytoolz instead of toolz
    to avoid the additional dependency.
    """
    seq = iter(seq)
    # check how many iterators we need
    try:
        first = tuple(next(seq))
    except StopIteration:
        return tuple()
    # and create them
    niters = len(first)
    seqs = itertools.tee(itertoolz.cons(first, seq), niters)
    return tuple(itertools.starmap(itertoolz.pluck, enumerate(seqs)))
def unzip ( seq : Iterable ) -> Tuple : seq = iter ( seq ) # check how many iterators we need try : first = tuple ( next ( seq ) ) except StopIteration : return tuple ( ) # and create them niters = len ( first ) seqs = itertools . tee ( itertoolz . cons ( first , seq ) , niters ) return tuple ( itertools . starmap ( itertoolz . pluck , enumerate ( seqs ) ) )