Antoon Pardon <[EMAIL PROTECTED]> writes: > On 7/12/07, Arash Arfaee <[EMAIL PROTECTED]> wrote: > > I need a powerset generator function. It's really slow with recursion. Does > > anybody have any idea or code(!!) to do it in an acceptable time? > My idea would be the following. ... > 3) let n range from 0 to 2 ** lng
That may help a little but my guess is the slowness comes from the size (2**n) of the power set. -- http://mail.python.org/mailman/listinfo/python-list