Having trouble understanding Python behavior when using inequality operators to compare lists. Here's a snippet using the python3 command line interpreter:
>>> [8] < [7]
False
>>> [8] < [9]
True
>>> [8, 6] < [9]
True
>>> [8, 6] < [9, 7]
True # So far so good
>>> [8, 6] < [9, 5]
True # Huh?
So, clearly Python isn't just moving through parallel indexes. I did find some information which says that in this scenario, Python orders the lists "lexicographically", which I guess means alphabetically.
So, I thought maybe the lists get sorted and then compared by parallel, but this is disproven by the following example:
>>> [1, 2, 3] < [3, 2, 1]
True
My guess was that the internal comparison would be [1, 2, 3] < [1, 2, 3], which should have returned False, since 1 < 1 is False, 2 < 2 is False, etc..
Any help is appreciated.