python ** code example
Example 1: ** in python
print(2 ** 3)
Example 2: * 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 3: ** in python
x = 6
y = 2
print(x**y)
Example 4: ** 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)
print(obj1 ** obj2)
Example 5: in python, i am pustin two star before paramerter what is that men
def foo(x,y,z):
print("x=" + str(x))
print("y=" + str(y))
print("z=" + str(z))