I was experimenting with set
in python and while I understood that it is unsorted, based on hashes, I find it strange that it automatically sorts these numbers, both in Python 2 and in 3:
>>> list(set([2,1,3,6,5,3,6,4]))
[1, 2, 3, 4, 5, 6]
>>> list(set([2,1,3,6,5,3,6,4,0,7]))
[0, 1, 2, 3, 4, 5, 6, 7]
I googled for some time but didn't find the answer to the behavior of these two functions combined.