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