You are viewing a single comment's thread. Return to all comments →
from itertools import permutations def permutation(string): combinations = list(permutations(string[0], int(string[1]))) for i in sorted(combinations): print("".join(i)) if __name__ == '__main__': S = input().split() permutation(S)
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 →