If I create a set object and add some value to this and then I add another value (smaller than before) sometimes set sorts it and puts the new value on the begging and sometimes just ignore any orders and puts it on the very end of the set.
Here's example with sorting:
>>> x = set()
>>> x.add(10)
>>> x.add(1)
>>> x
{1, 10}
>>>
And here's the case I don't really understand:
>>> x = set()
>>> x.add(10)
>>> x.add(2)
>>> x
{10, 2}
>>>
Maybe set just do not sort values but why in the first case value 1 is putted on the beginning if I added it to set after 10 value. I don't really understand why it works like that. Sometimes it sorts a new added value and sometimes not.