[Tutor] Set changing order of items?

Simon Brunning simon at brunningonline.net
Fri Jan 19 20:51:50 CET 2007


On 1/19/07, Adam Cripps <kabads at gmail.com> wrote:
> I'm adding strings to a Set to prevent duplicates. However, the
> strings are meant to be in the correct order. When I add the string to
> the Set, the order seems to change (and I don't seem to be able to
> predict what order they are in).

Sets, like dictionaries, hold their items in an arbitrary order - see
<http://tinyurl.com/a2nkg>.

-- 
Cheers,
Simon B
simon at brunningonline.net


More information about the Tutor mailing list