📜  组合不重复python代码示例

📅  最后修改于: 2022-03-11 14:46:02.107000             🧑  作者: Mango

代码示例2
>>> import itertools as it
>>> list(it.combinations([1,2,3,4,5], 4))
[(1, 2, 3, 4), (1, 2, 3, 5), (1, 2, 4, 5), (1, 3, 4, 5), (2, 3, 4, 5)]