In article <[EMAIL PROTECTED]>, Girish Sahani <[EMAIL PROTECTED]> wrote: >Hi guys, > I want to generate all permutations of a string. I've managed to >generate all cyclic permutations. Please help :) > >def permute(string): > l= [] > l.append(string) > string1 = '' > for i in range(0,len(string)-1,1): > string1 = string[1:len(string)] + string[:1] > l.append(string1) > 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: http://www.unixreview.com/documents/s=10089/ur0606j/ur0606j.html > and related materials. and its referents. -- http://mail.python.org/mailman/listinfo/python-list