def rzip(*iterables):
    """Like builtin `zip`, but uses the right end of longer iterables instead of the left.

    Examples:
    rzip([1,2,3], [4,5]) -> ((2, 4), (3, 5))
    """
    lens = [len(it) for it in iterables]
    min_len = min(lens)
    diffs = [len_ - min_len for len_ in lens]
    return tuple(tuple(it[i + diffs[diff_ind]] for diff_ind, it in enumerate(iterables)) for i in range(min_len))