I have some problems with my code to work with both python 2 and python 3 when compare tuple with integer
I understand from python3 tuple cannot be compared with other data types directly, e.g., integer
However, in python 2, the following code is working
>>> t=(0,0)
>>> t > 1
True
>>> t < 1
False
In python 3, it fails with error tuple cannot be compared with int.
Any hints on how to make this work with both python 2 and python 3?