pow()

Built-in FunctionPython 2.0+Intermediate

Returns base raised to a power, optionally with modulus

Quick Info

Documentation
Official Docs
Python Version
2.0+

Learn by Difficulty

Quick Example

python
print(pow(2, 10))
print(pow(2, 10, 1000))
print(pow(3, -1))

pow() is a built-in function that returns base raised to a power, optionally with modulus.

Try in Playground

Tags

builtinfunctioncore