overlapping sets

Lonnie Princehouse finite.automaton at gmail.com
Fri Mar 24 14:55:44 EST 2006


There is a sets.Set class built in to Python.  You might want to use
this instead of lists.  It defines some handy set operations like
intersection, union, and so on.

from sets import Set

my_sets = {
  'one' : Set([0,4,7,9]),
  'two' : Set([0,3,7,9]), 
  etc...
}




More information about the Python-list mailing list