s = {1,1,2,2,3,2,1,2,4,3,5,8}
s.add(7)
print(s)
#the output is
{1, 2, 3, 4, 5, 7, 8}.
However , for
s = {1,1,2,2,3,2,1,2,4,3,5,100}
s.add(7)
print(s)
#the output is
{1, 2, 3, 4, 100, 5, 7}.
My question: why is it that in the first case, the '7' is added to the set so that the set is ordered in ascending order, whereas in the second case, it is added to the end of the set?