Is there a short-hand for nth root of x in Python

后端 未结 8 1139
闹比i
闹比i 2020-12-03 09:37

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

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 10:13

    Also: x**(n**-1), which is the same but shorter than x**(1/float(n))

提交回复
热议问题