x 3 in python code example

Example 1: x and y in python

x = 10
y = 12

# Output: x > y is False
print('x > y is',x>y)

# Output: x < y is True
print('x < y is',x<y)

# Output: x == y is False
print('x == y is',x==y)

# Output: x != y is True
print('x != y is',x!=y)

# Output: x >= y is False
print('x >= y is',x>=y)

# Output: x <= y is True
print('x <= y is',x<=y)

Example 2: ** in python

#** is the exponent symbol in Python, so:
print(2 ** 3)
#output: 8

Example 3: logical operators in python

condition1 and condition2
condition1 or condition2
not condition