Permutation in python

http://www.ab126.com/shuxue/1709.html

[from itertools import permutations

s = list(range(1,9))
s
[1, 2, 3, 4, 5, 6, 7, 8]
list(permutations(s,8))[0]
(1, 2, 3, 4, 5, 6, 7, 8)
len(list(permutations(s,8)))
40320
]()

posted @ 2020-05-27 13:03  sailonzn  阅读(143)  评论(0)    收藏  举报