Python Power Operator

** operator used as a power(exponent) operator in python.

Example

10 ** 2 = 100. pow(10,2);   10 * 10

5 ** 3 = 125.   pow(5,3);     5 * 5 * 5




** operator in Python - Example program

Example

#Python power operator example

print(10 ** 2)
print(5 ** 3)


Example

#Python power operator example
#Change the below value and try it yourself.

a = 10
b = 4

ans = a ** b

print(ans)