# permutations de {1,2,3} L = {1,2,3} PERM = [] for x in L: for y in L: for z in L: if len({x,y,z})==3: PERM = PERM + [(x,y,z)]