** 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: or in python

# Syntax for Boolean expression with or in Python
exp1 or exp2

Example 4: * in python

>>> fruits = ['lemon', 'pear', 'watermelon', 'tomato']
>>> print(fruits[0], fruits[1], fruits[2], fruits[3])
lemon pear watermelon tomato
>>> print(*fruits)
lemon pear watermelon tomato

Example 5: ** in python

# ** means modulus. or exponent
x = 6
y = 2
print(x**y) # will print 6 raised to power 2

Example 6: ** in python

""" depends on the data type too """
def callme(key1, key2):
  print(key1, key2)
    
obj1 ,obj2 = 6, 9
obj3 = {
  "key1": 1,
  "key2": 2
}
callme(**obj3) # easy for calling functions
print(obj1 ** obj2) # Here it is a operator (for calculating obj1 ^ obj2)