This question already has an answer here:
- Code-Golf: Permutations 25 answers
Given a string of English alphabet characters, write the shortest code to print all possible permuations in lexicographical order without using any language based library.
def function('bca'): return all_permutation.
This should return :
abc, acb, bac, bca, cab, cba