We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
itertools.permutations()
itertools.permutations()
Sort by
recency
|
948 Discussions
|
Please Login in order to post a comment
from itertools import permutations
a , b = input().split() b = int(b) permutations_groups = permutations(sorted(a),b)
for j in permutations_groups: print(*j,sep="")
I have solved this problem yet it is not getting marked as solved. Has it happened to anyone of you? What to do in such a case?
****from itertools import permutations Q,J=input().split() d=sorted(permutations(Q,int(J)))
***for w in d: print("".join(w))*