You are viewing a single comment's thread. Return to all comments →
Easy 3 liner. Could be two lines but that's ugly code lol
from itertools import permutations S, k = input().split() [print(''.join(x)) for x in sorted(permutations(S, int(k)))]
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 →
Easy 3 liner. Could be two lines but that's ugly code lol