PythonNumberpow

Returns base to the power exp, optionally modulo mod.

Syntax

pow(base, exp, mod?)

Example

Enter values below to update the example in real time.

print
print(pow(2, 10))      # 1024
print(pow(3, 4, 5))    # 1  (3^4 % 5)