Powerset

Discussion in 'Python' started by Tim Rowe, Sep 15, 2003.

  1. Tim Rowe

    Tim Rowe Guest

    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...
    Tim Rowe, Sep 15, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. matt

    powerset operation

    matt, Jan 17, 2004, in forum: Perl
    Replies:
    0
    Views:
    1,295
  2. Gunnar G

    powerset

    Gunnar G, Aug 9, 2005, in forum: C++
    Replies:
    1
    Views:
    515
    Karl Heinz Buchegger
    Aug 9, 2005
  3. Evan Klitzke

    Re: Fast powerset function

    Evan Klitzke, Jul 13, 2007, in forum: Python
    Replies:
    6
    Views:
    991
    Carsten Haese
    Jul 13, 2007
  4. Evan Klitzke

    Re: Fast powerset function

    Evan Klitzke, Jul 13, 2007, in forum: Python
    Replies:
    0
    Views:
    421
    Evan Klitzke
    Jul 13, 2007
  5. Evan Klitzke

    Re: Fast powerset function

    Evan Klitzke, Jul 13, 2007, in forum: Python
    Replies:
    1
    Views:
    386
    Mark Dickinson
    Jul 14, 2007
Loading...

Share This Page