Operator 1, arithmetic operation: +,-, *, %, **, print (3 + 2) & amp; gt; 5 print (3-2) & amp; gt; 1 print (2*4) & amp; gt; 8 print (93) & amp; gt; 3 print (2 ** 2) & amp; gt; 4 print (100% 51) & amp; gt; 49 print (92) & amp; gt; 42. comparison calculation :,!, & Amp; l... Operator
1. arithmetic operation: +,-, *,/, % ,**,//
Print (3 + 2) = & gt; 5 print (3-2) = & gt; 1 print (2*4) = & gt; 8 print (9/3) => 3 print (2 ** 2) => 4 print (100% 51) => 49 print (9 // 2) => 4
2. comparison calculation: = ,! =, <>,>, <, >=, <=
Print (3 = 2) => Falseprint (3! = 2) => Trueprint (2 <> 4) => True # python3.5 has been canceled and integrated! = Print (9> 3) => Trueprint (2 <2) => Falseprint (100> = 51) => Trueprint (9 <= 2) => False
3. value assignment: =, + =,-=, * =,/=, % =, ** =, // =
A = 5 print (a) => 5a = 5b = 1b + = a # B = B + aprint (B) => 6a = 5b = 1b-= a # B = B-aprint (B) =>-4a = 5b = 1b * = a # B = B * aprint (B) => 5a = 5b = 1b/= a # B = B/aprint (B) => 0.2a = 5b = 1b ** = a # B = B ** aprint (B) => 1a = 5b = 1b % = a # B = B % aprint (B) => 1a = 5b = 1b // = a # B = B // aprint (B) => 0
4. logical computing: and, or, not
A = Trueb = Falseprint (a and B) => False # True print (a or B) => True # as long as, if one of B is True, True print (not a) => False # Non-True print (not B) => True # Non-False
5. member operation: in, not in
A = [11,22, 33,44]
B = 11
C = 123.
Print (B in a) => True
Print (c not in a) => True