1
vote
1answer
894 views

sorting using a custom definition of “>” and “< ” in python

suppose I have a custom function such as def greater(a, b): if (a % b) % 2 == 0: return 1 return 0 It defines how to compare two numbers and determine which is greater. In this ...