import itertools
#排列
list1 = list(itertools.permutations([1,2,3,4,5,6],2))
# print(list1)
print(len(list1))
# list2 = itertools.permutations([1,2,3,4,5,6],2)
# print(tuple(list2))
#组合
list3 = list(itertools.combinations([1,2,3,4,5,6],2))
# print(list3)
print(len(list3))
#排列组合
list4 = list(itertools.product([1,2,3,4,5,6,7,8,9,0],repeat=3))
# print(list4)
print(len(list4))
转载于:https://www.cnblogs.com/chen-wg/p/10836719.html