开发者

** (times times) in Python [duplicate]

This question already has answers here: 开发者_如何学运维 Closed 11 years ago.

Possible Duplicate:

What does the ** operator do in Python?

What does the ** do/mean in following python code?

range(2,int(startnumber**0.5)+1)

I was working with some Fibonacci numbers and fell over the function on the internet. Can't seem to find it in the documentation


It means "to the power of." So x**2 means x squared, and x**0.5 means the square root of x.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜