How to generate all permutations of a string?
claird at lairds.us
Thu Jun 22 12:42:07 CEST 2006
In article <mailman.7352.1150963651.27775.python-list at python.org>,
Girish Sahani <girish at cse.iitb.ac.in> wrote:
> I want to generate all permutations of a string. I've managed to
>generate all cyclic permutations. Please help :)
> l= 
> string1 = ''
> for i in range(0,len(string)-1,1):
> string1 = string[1:len(string)] + string[:1]
> string = string1
> return l
Those so passionate about enumerations as to consider *everything*
known about them, and not just a specific Python function, will
want to be aware of the referent of <URL:
and related materials.
and its referents.
More information about the Python-list