You are viewing a single comment's thread. Return to all comments →
from itertools import permutations if __name__ == '__main__': s, length = input().split() print('\n'.join([''.join(i) for i in permutations(sorted(s), int(length))]))
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 →