Utilizor
Contact Us

Python Operators

Arithmetic, Assignment, Comparison.

Examples

Arithmetic

Performing math.

x = 5
y = 2
print(x + y)
print(x % y)
print(x ** y) # Power
print(x // y) # Floor division

Logical

Returns True because 5 is greater than 3 AND 5 is less than 10.

x = 5
print(x > 3 and x < 10)

Test Your Knowledge

Python Quiz

No quiz available for this topic yet.