Arithmetic operator

+ - * / this4One is the easiest. % modulus/ / divisible
Copy the code

Comparison operator

Return False if two objects are equal. ! = not equal - Compares whether two objects are not equal (a! = b) returns True. > greater than - Returns whether x is greater than y (a > b) returns False. < less than - Returns whether x is less than y. All comparison operators return1Represents true, returns0Said false. This is equivalent to the special variables True and False respectively. Note that the variable names are capitalized. (a < b) returns True >= greater than or equal to - returns whether x is greater than or equal to y. (a >= b) returns False. <= less than or equal to - returns whether x is smallCopy the code

The assignment operator

= Simple assignment operator c = a + b Assigns the result of a + b to c += addition assignment operator C += a is equivalent to c = c + a -= subtraction assignment operator C -= a is equivalent to c = c - A *= multiplication assignment operator C *= A is equivalent to c = c * a /= division assignment operator C /= division assignment operator C = c/a %= modular assignment operator C %= a is equivalent to c = c % a **= power assignment operator C **= a is equivalent to c = C ** A//= The assignment operator c //= a is equivalent to c = c // a
Copy the code