Python Operators

CategoryOperators
Arithmetic+ - * / // % **
Comparison== != > < >= <=
Logicaland or not
Assignment= += -= *= /= //= **=
Membershipin, not in
Identityis, is not
Bitwise& | ^ ~ << >>
Python
a, b = 17, 5
print(a / b)     # true division
print(a // b)    # floor division
print(a % b)     # remainder
print(a ** 2)    # power
print(3 in [1, 2, 3], a > b and b > 10)
3.4 3 2 289 True False
== vs is== compares values; is checks whether two names refer to the same object.
Track your progress through the Python course