Simple syntax question.
In maths if I have two number 3 and 2 and I wish to calculate 3 to the power of 2 then no symbol is required but I write the two small. In Python
this operation seems to be represented by the **
syntax.
>>> 3**2
9
If I want to go the other direction and calculate the 2nd root of 9 then in maths I need to use a symbol:
Is there a short-hand symbol in Python, similar to **
that achieves this i.e.2<symbol>9
. Or do I need to use the math
module ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…