(elements)
returns a list with the permuations.
returns a list with the permuations.
returns a list with the permuations .
def permute(elements):
    """
        returns a list with the permuations.
    """
    if len(elements) <= 1:
        return [elements]
    else:
        tmp = []
        for perm in permute(elements[1:]):
            for i in range(len(elements)):
                tmp.append(perm[:i] + elements[0:1] + perm[i:])
        return tmp
def permute ( elements ) : if len ( elements ) <= 1 : return [ elements ] else : tmp = [ ] for perm in permute ( elements [ 1 : ] ) : for i in range ( len ( elements ) ) : tmp . append ( perm [ : i ] + elements [ 0 : 1 ] + perm [ i : ] ) return tmp