python itertools模塊

import itertools 1.有序排列 a=itertools.permutations([1,2,3,4],2) print a #結果: <itertools.permutations object at 0x0000000001FD8F10> print list(a) #結果: [(1, 2), (1, 3), (1, 4), (2, 1), (2, 3), (2, 4), (3
相關文章
相關標籤/搜索