You are viewing a single comment's thread. Return to all comments →
from itertools import combinations n,r = input().split() n = sorted(n) l1 = list() for i in range(1,int(r)+1): a = l1.append(list(combinations(n,int(i)))) for item in l1: for i in range(len(item)): print("".join(item[i]),end="\n")
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 →