Powerset

Tim Rowe tim at remove_if_not_spam.digitig.co.uk
Mon Sep 15 14:41:15 EDT 2003


Has anybody written a good powerset function for that nice new set
datatype we now have?  I've found a powerset operator for Python lists
on the net, but that depends on lists being indexable which sets
aren't.  I suppose one answer is to iterate the set into a list, use
the powerset I've got, then iterate the answer back int a set...




More information about the Python-list mailing list