Equivalent of std::set

anton muhin antonmuhin.REMOVE.ME.FOR.REAL.MAIL at rambler.ru
Fri Sep 26 16:11:38 CEST 2003

Nicolas Fleury wrote:
> Hi,
> I haven't work so much in python and I was wondering what python 
> programmers use for string collections, like an equivalent of C++ 
> std::set.  Do you use a dictionary with dummy values?  Tuple/list?  Is 
> there any other structure in some module with uniqueness ensured and 
> lookup optimised?  I'm only interested in storing strings in that 
> structure.
> Thx for help
> Nicolas

Python 2.3 introduced Set type, in the former versions common idiom was 
to use dictionaries with dummies IMHO.


More information about the Python-list mailing list