python内置库--排列组合
from itertools import permutations, combinations
res = permutations(range(3), 2)
print(list(res))
# (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)
res = permutations([0,0,1,1], 2)
print(set(list(res)))
re...
原创
2020-04-12 22:45:11 ·
1123 阅读 ·
0 评论