You can tell if an object can do comparison by looking to see if it has comparison dunder methods.
Output:
>>> x = (1, 2)
>>> dir(x)
['__add__', '__class__', '__class_getitem__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'count', 'index']
>>>
Here I see that the tuple x can do __eq__, __ge__, __gt__, __le__, __lt__ and __ne__ which correspond to the comparison operators =, >=, >, <=, <, !=. You still have to read the documentation for the class, because this only tells you that comparison is supported, not how the comparison is done.
https://docs.python.org/3/tutorial/datastructures.html
Quote:5.8. Comparing Sequences and Other Types
Sequence objects typically may be compared to other objects with the same sequence type. The comparison uses lexicographical ordering: first the first two items are compared, and if they differ this determines the outcome of the comparison; if they are equal, the next two items are compared, and so on, until either sequence is exhausted. If two items to be compared are themselves sequences of the same type, the lexicographical comparison is carried out recursively. If all items of two sequences compare equal, the sequences are considered equal. If one sequence is an initial sub-sequence of the other, the shorter sequence is the smaller (lesser) one. Lexicographical ordering for strings uses the Unicode code point number to order individual characters. Some examples of comparisons between sequences of the same type:
For lists an tuples, the items in the list or tuple must also be comparable.
x = ('A', 'B', 'C')
y = (1, 2, 3)
print(x > y)
Error:
print(x > y)
^^^^^
TypeError: '>' not supported between instances of 'str' and 'int'