Skip to content

Python中的排列组合

solei1 edited this page Feb 25, 2017 · 1 revision

combinations(m, n)

对应于数学中的组合,参数m是元素的集合,n是元素的数量

permutations(m, n)

对应于数学中的排列,参数m是元素的集合,n是元素的数量

product(m, repeat=n)

元素可重复的排列,参数m是元素的集合,n是元素的数量