标签:code import itertools ati class iter rto product 排列
1 # 排列 2 from itertools import product 3 l = [1, 2, 3] 4 print(list(product(l, l))) 5 print(list(product(l, repeat=4))) 6 7 # 组合 8 from itertools import combinations 9 print(list(combinations([1,2,3,4,5], 3)))
标签:code import itertools ati class iter rto product 排列
原文地址:https://www.cnblogs.com/hahasd/p/12305455.html