And in Python 2.6 onwards: import itertools itertools.permutations([1,2,3]). (returned as a generator. Use list(permutations(l)) to return as a list.).
確定! 回上一頁