0013 _ operator, 0013 Operator
1. Arithmetic Operators
+
-
*
/
% (Remainder)
// (Division)
Python2.7: 9/2 = 4
9/2 = 4.5 (import module from _ future _ import division)
Python3: 9/2 = 4.5
2. Comparison Operators
= Compare whether objects are equal
! = Compare whether two objects are not equal
<> Compare whether two objects are not equal
> Greater
<Less
> = Greater than or equal
<= Less than or equal
3. Value assignment operator
= Value assignment
+ = Auto-Increment
-= Auto-Subtraction
* = Self-Multiplication
/= Self-Division
4. logical operators
And
Or
Not no
5. member operators
In determines whether a = "alex SB" ret = "SB" in a print (ret) => True
Not in determines whether B = ['Alex ', 'Eric', 'rain'] ret = 'xb 'in B print (ret) => False
6. Identity Calculation
Is used to determine whether two identifiers reference an object x is y. If id (x) is equal to id (y), is returns result 1.
Is not