Answers for "Using Python Permutations to Find the order in lexicographical sorted order"

0

Using Python Permutations to Find the order in lexicographical sorted order

from itertools import permutations 
string,n = input(“Enter string and size”).split() 
print(*[''.join(i) for i in permutations(sorted(string),int(n))],sep='\n')
Posted by: Guest on April-10-2022

Code answers related to "Using Python Permutations to Find the order in lexicographical sorted order"

Python Answers by Framework

Browse Popular Code Answers by Language