def cartes(seq0, seq1, modus='pair'):
    """
    Return the Cartesian product of two sequences

    >>> from sympy.utilities.iterables import cartes
    >>> cartes([1,2], [3,4])
    [[1, 3], [1, 4], [2, 3], [2, 4]]

    """
    if  modus == 'pair':
        return [[item0, item1] for item0 in seq0 for item1 in seq1]
    elif modus == 'triple':
        return [item0 + [item1] for item0 in seq0 for item1 in seq1]