我知道我可以使用itertools.permutation來獲取大小爲r的所有排列組合。 但是,對於itertools.permutation([1,2,3,4],3)它將返回(1,2,3)以及(1,3,2)。
確定! 回上一頁