News
A recursive approach (which is what I would use) would involve breaking the problem into isomorphic subproblems: to find all permutations of a string, find all permutations of the string without a ...
def perms(s, temp): """s is a string, temp is part of the output found so far.""" if len(s) == 0: print temp return for i in s: s2 = s.replace(i, '') temp += i perms ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results