What is the output of the following code ?
>>> s1 = [23, 24, 25, 12] >>> s2 = [23, 24, 26] >>> s1 > s2
False
True
IndexError
ValueError
The comparison operator ">" compares each element until it finds a difference . When 25 of s1 is compared with 26 of s2, > gives False and does not move further to test.
So the result will be False
Comment here: