There are no CMP functions in the Python 3.4.3 version and are replaced by operator modules, which need to be imported when used in interactive mode.
In the absence of an import module, there will be
If the CMP function is not found, how do you use this function in Python3?
So to import the module
Look at the built-in functions given below
These functions are used to replace the previous CMP, and our fellow countrymen who used CMP before, we will change these functions later.
Let's just say the meaning of these few functions.
LT (A,b) is the equivalentof a <b from the first digit or letter (ASCII) size
Le (A,b) corresponds to a<=b
eq (A,b) equals a= =B letter Exactly, returns True,
NE (A,b) equals a!=b
GT (A,b) equivalent to a>b
GE (A,b) is equivalent to a>=b
The return value of the function is Boolean OH
Replacing CMP functions in Python2 in Python3