The following sentences are a cause of confusion for me(from Guido’s Tutorial on python.org):
“Note that comparing objects of
different types is legal. The outcome
is deterministic but arbitrary: the
types are ordered by their name. Thus,
a list is always smaller than a
string, a string is always smaller
than a tuple, etc.”than a tuple, etc.”
That means that for :
a=[90]
b=(1)
a<b
the result should be True. But it is not so!
Can you help me out here?than a tuple, etc.”
Also, what is meant by “The outcome is deterministic but arbitrary”?
(1)is anint. You probably meant(1,), which is atuple.