Operators
+ - *
** (twice for exponentiation)
assignment operators - += -+ *= /=
also -= *= /= **= %= //=
also //= and %=
bodmas applies
print(10 > 9) # True
and Operator
(5 > 3) and (4 < 3)
or Operator
(5 > 3) or (4 < 3)
not Operator
if not keep_looking(x, y): break
if not(5 > 3)
x = ["apple", "banana"]
print("pineapple" not in x) # returns True
in Operator
in operator
Membership operators are used to test if a sequence is present in an object. The in and not in operators are examples of these:
x = ["apple", "banana"]
print("banana" in x) # returns True
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext