You are viewing a single comment's thread. Return to all comments →
from itertools import permutations S, k = input().split() ki = int(k) Sf = [i for i in S if i.isalpha() is True] Sf.sort() lp = list(permutations(Sf, ki)) for p in lp: print(''.join(p))
Seems like cookies are disabled on this browser, please enable them to open this website
itertools.permutations()
You are viewing a single comment's thread. Return to all comments →