Lesson 7 / 47

Operators

Arithmetic, comparison, logic, membership.

Division variants

/ always gives a float; // floors; ** is power.

7 / 2     # 3.5
7 // 2    # 3
7 % 2     # 1
2 ** 10   # 1024

Logic & membership

and, or, not are words. Chaining works: 0 < x < 10. Membership: 3 in [1,2,3].