Feb-05-2024, 12:31 PM
From documentation (Value Comparisons):
This means that order is important. This makes sense in strings (this is the way how words are ordered in any dictionary) but with tuples and lists one must be aware what practical implications of lexicographical comparison have on greater or less:
Quote:Sequences compare lexicographically using comparison of corresponding elements.
This means that order is important. This makes sense in strings (this is the way how words are ordered in any dictionary) but with tuples and lists one must be aware what practical implications of lexicographical comparison have on greater or less:
>>> a = (2, 1) >>> b = (1, 4, 5, 10) >>> a < b False1 is smaller than 2 and so b is smaller than a.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.