#case #1
a=(5,6)
b=(1,4)
if (a>b):print("a is bigger")
else: print("b is bigger")
# In this case, comparison starts with the first element of each tuple, so 5>1
Output:
"a is bigger"
#case #2
a=(5,6)
b=(5,4)
if (a>b):print("a is bigger")
else: print ("b is bigger")
#In this case, comparison starts with a first element of each tuple, since 5 = 5, the test is
#inconclusive so it moves to the next element in each tuple, so 6>4
Output:
"a is bigger"
#case #3
a=(5,6)
b=(6,4)
if (a>b):print("a is bigger")
else: print("b is bigger")
#In this case, comparison starts with the first element of each tuple, since 5 > 6:
Output:
"b is bigger"