Arithmetic operator
+
-
*
/ except
// Integers , Take business
% modulus , It's also a surplus , The remainder after division
** Index , Power operation
()
() higher than ** higher than * / // % higher than +-
Assignment operator
=, It can be a single variable , You can also assign values to multiple variables , such as a , b, v, d = 3,g = e = r = 17, You can also assign multiple variables at the same time
Compound assignment operator
+=、-=、*=、/=、//=、%=、**=
Compound with others , First calculate the... On the right of the compound assignment operator , Recalculate compound .
Comparison operator
==、!= 、>、<、>=、<=
Logical operators
and Bull and : Both are true , It is true
or Boor or : One is true is true
not Buffy : There is only one operand , It's true , Just go back to the fake
Usually when writing , The part to judge whether it is true or false will be bracketed , It is more convenient to read programs
python Same as c, A non-zero number is false ,and Operator , There is one 0 Then for 0, Otherwise, return the last non 0 Numbers ;or Operator , All are 0 Only then 0, Otherwise, return the first non 0 Numbers .
end .