Open NeroCube opened 3 years ago
from itertools import combinations cols = list(range(1, 15+1)) num = 0 for c in range(10,len(cols)+1): print(c) print('-'*10) for selected_feature in list(combinations(cols,c)): print(list(selected_feature)) num=num+1 print(num)
itertools --- 為高效循環而創建迭代器的函數
Example
Reference
itertools --- 為高效循環而創建迭代器的函數