In Python, ^ is a bitwise XOR operator. I believe what you're looking for is the exponent operator, **. An example would be 2**3 which outputs 8, like I believe you were looking for.
0
Wasif
On
The ^ operator does a bitwise XOR operation. In python to do power calculation use pow() function:
In Python,
^is a bitwise XOR operator. I believe what you're looking for is the exponent operator,**. An example would be2**3which outputs8, like I believe you were looking for.