PythonPython魔法系列-1-List的排列组合 python list的排列组合 from itertools import product, combinations l = [1, 2, 3] print(list(product(l, l))) # [(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)] pri……继续阅读 » admin 12个月前 (02-03) 329浏览 0评论 0个赞