def interleave(args):
    r"""
    zip followed by flatten

    Args:
        args (tuple): tuple of lists to interleave

    SeeAlso:
        You may actually be better off doing something like this:
            a, b, = args
            ut.flatten(ut.bzip(a, b))

            ut.flatten(ut.bzip([1, 2, 3], ['-']))
            [1, '-', 2, '-', 3, '-']

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_iter import *  # NOQA
        >>> import utool as ut
        >>> args = ([1, 2, 3, 4, 5], ['A', 'B', 'C', 'D', 'E', 'F', 'G'])
        >>> genresult = interleave(args)
        >>> result = ut.repr4(list(genresult), nl=False)
        >>> print(result)
        [1, 'A', 2, 'B', 3, 'C', 4, 'D', 5, 'E']
    """
    arg_iters = list(map(iter, args))
    cycle_iter = it.cycle(arg_iters)
    for iter_ in cycle_iter:
        yield six.next(iter_)
def interleave ( args ) : arg_iters = list ( map ( iter , args ) ) cycle_iter = it . cycle ( arg_iters ) for iter_ in cycle_iter : yield six . next ( iter_ )
r"""
    zip followed by flatten

    Args:
        args (tuple): tuple of lists to interleave

    SeeAlso:
        You may actually be better off doing something like this:
            a, b, = args
            ut.flatten(ut.bzip(a, b))

            ut.flatten(ut.bzip([1, 2, 3], ['-']))
            [1, '-', 2, '-', 3, '-']

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_iter import *  # NOQA
        >>> import utool as ut
        >>> args = ([1, 2, 3, 4, 5], ['A', 'B', 'C', 'D', 'E', 'F', 'G'])
        >>> genresult = interleave(args)
        >>> result = ut.repr4(list(genresult), nl=False)
        >>> print(result)
        [1, 'A', 2, 'B', 3, 'C', 4, 'D', 5, 'E']