How can I display all the permutations in a string or any other iterable in the most simplest way for a beginner...
def permutations(iterable):
#code here
Ex. Permutations("abc")
Output: "abc","acb","bac","bca","cba","cab"
How can I display all the permutations in a string or any other iterable in the most simplest way for a beginner...
def permutations(iterable):
#code here
Ex. Permutations("abc")
Output: "abc","acb","bac","bca","cba","cab"