def test(tuples=None,comparisons=None): tuples = [ (), (1,2,3), (4,5,6), (1,2), (1,3), (0,), (47,), ] comparisons = [ lambda a, b: a < b, lambda a, b: a > b, lambda a, b: a <= b, lambda a, b: a >= b, lambda a, b: a == b, ] for i in tuples: for j in tuples: for c in comparisons: print(c(i,j)) test()