You are viewing a single comment's thread. Return to all comments →
from itertools import combinations as com l,p = input().split() l = sorted(l) for i in range(int(p)): b = list(com(l,(int(i) + 1))) for k in b: print(''.join(k))
Seems like cookies are disabled on this browser, please enable them to open this website
itertools.combinations()
You are viewing a single comment's thread. Return to all comments →