In python suites, they are compared based on whether one is a subset of the other.
No - this is a subset of the other, therefore <it gives Falsein all cases, therefore the first is returned.
So, {1}<{0}gives Falseexactly the same as {2}<{1}gives Falseand {2}<{3,4,5}gives False. However {1,2}<{1,3,2}gives True. This means that the general order is not defined on the set .
source
share