On 1/19/07, Simon Brunning <[EMAIL PROTECTED]> wrote:
> On 1/19/07, Adam Cripps <[EMAIL PROTECTED]> 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>.

OK - thanks for that - so it seems that using a Set will complicate
the matter more.

Really, I want to have a set of sets which won't have any duplicates.
An example might look something ilke this:

sums = [['1) 10 + 2 =', '12'], ['2) 13 + 4 =', '17']]
return sums

How might I achieve this list, without the duplicates (the duplicate
bit is the bit I'm stuck on).

Adam
-- 
http://www.monkeez.org
PGP key: 0x7111B833
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to