cmp() python

cmp(a, b)
a and b are the two numbers in which the comparison is being done. 
-1 if ab

Here is what the above code is Doing:
1. We are defining a function named cmp().
2. This function takes two parameters, a and b.
3. The function compares the two numbers and returns -1 if a < b, 0 if a = b, and 1 if a > b.