There does seem to be some consistency in that calling set()
on a string always seems to resolve to the same (non-alabetical) order, and both
set([1,2,3]) & set([1,2,3,4])
and its jumbled up cousin
set([2,3,1]) & set([4,3,1,2])
will result in orderly-looking set([1,2,3])
.
On the other hand, something like a bit more racy, such as
from random import randint
set([randint(0,9) for x in range(3)])
will sometimes give something like set([9, 6, 7])
...
... what is going on here?