def mystere(L, M = [ ]): # L est une liste if L is None or len(L) == 0: return M a = L.pop(0) if a not in M: M.append(a) return mystere(L, M)