Python Math Pow Method

Now, we are going to learn about the Python Math Pow Method. The pow method takes in two numbers as arguments, for example, x and y, and the pow method returns the result of x to the power of y. Let’s have a look at a simple example, with which, we can simply understand about pow method.

Python Math Pow

As you can see in the above program, we have imported the math module, and then we are calling the pow method, and we are passing two arguments as 2, and 3. The thing is that as a return value, we get the value of 2 to power 3.

So, you can see, to calculate the result of some number to the power of another number, we can simply make use of the pow method from the math module, as and when required, in our programs.