-3

What is ** (two asterisks) used for in Python?

Like, exampleVariable = 5 ** 5

Thanks for any help!

2 Answers2

2

** is used as exponent. So 2 ** 2 is 2 to the second power, or 3 ** 3 is 3 to the third power, or 27.

joelanbanks3
  • 188
  • 1
  • 12
2

It is the operator for exponentiation. 5 ** 5 means "five to the power of five"

cpk
  • 106
  • 3