def permutation_alea(n): S = list(range(n)) # S reçoit [0,...,n-1] shuffle(S) # mélange les items de S return S