Why does Python produce different sets from identical input?

Viewed 100

Condider the following example:

>>> {1, True}
set([True])
>>
>>> {True, 1}
set([1])

Why is the set represented differently, depending on the order of the elements?

2 Answers
Related