import itertools 排列: 4个数内选2个 >>> print list(itertools.permutations([1,2,3,4],2)) [(1, 2), (1, 3), (1, 4), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (3, 4), (4, 1), (4, 2), (4, 3)] 组合:4个数内选2个: >>> p... Read More
posted @ 2015-06-12 12:13 庚武 Views(1385) Comments(0) Diggs(0) Edit