Ordering python sets
mr.spoon21 at gmail.com
Wed Oct 22 14:22:08 CEST 2008
I need a structure to represent a set of integers. I also need to
perform on this set some basic set operations, such as adding or
removing elements, joining with other sets and checking for the
presence of specific elements.
I think that using Python sets would be the best choice, but I also
need integers to be ordered inside the set and I've just found out
that, instead, Python sets are unordered collections.
Is there another convenient structure or shall I use lists and define
the operations I need?
More information about the Python-list