(*seqs)
Return the subsequence that is a common ending of sequences in ``seqs``.

    >>> from sympy.utilities.iterables import common_suffix
    >>> common_suffix(list(range(3)))
    [0, 1, 2]
    >>> common_suffix(list(range(3)), list(range(4)))
    []
    >>> common_suffix([1, 2, 3], [9, 2, 3])
    [2, 3]
    >>> common_suffix([1, 2, 3], [9, 7, 3])
    [3]
Return the subsequence that is a common ending of sequences in ``seqs``.
Return the subsequence that is a common ending of sequences in seqs .
def common_suffix(*seqs):
    """Return the subsequence that is a common ending of sequences in ``seqs``.

    >>> from sympy.utilities.iterables import common_suffix
    >>> common_suffix(list(range(3)))
    [0, 1, 2]
    >>> common_suffix(list(range(3)), list(range(4)))
    []
    >>> common_suffix([1, 2, 3], [9, 2, 3])
    [2, 3]
    >>> common_suffix([1, 2, 3], [9, 7, 3])
    [3]
    """

    if any(not s for s in seqs):
        return []
    elif len(seqs) == 1:
        return seqs[0]
    i = 0
    for i in range(-1, -min(len(s) for s in seqs) - 1, -1):
        if not all(seqs[j][i] == seqs[0][i] for j in xrange(len(seqs))):
            break
    else:
        i -= 1
    if i == -1:
        return []
    else:
        return seqs[0][i + 1:]
def common_suffix ( * seqs ) : if any ( not s for s in seqs ) : return [ ] elif len ( seqs ) == 1 : return seqs [ 0 ] i = 0 for i in range ( - 1 , - min ( len ( s ) for s in seqs ) - 1 , - 1 ) : if not all ( seqs [ j ] [ i ] == seqs [ 0 ] [ i ] for j in xrange ( len ( seqs ) ) ) : break else : i -= 1 if i == - 1 : return [ ] else : return seqs [ 0 ] [ i + 1 : ]