返回顶部

收藏

in a range

更多
from math import sqrt

for n in range(99, 0, -1):
    root = sqrt(n)
    if root == int(root):
        print n
        break

标签:Python,Buildin,Function

收藏

0人收藏

支持

0

反对

0

»更多 您可能感兴趣的代码
  1. 2016-03-10 12:03:30range with step by 蟋蟀MM
  2. 2016-04-23 14:41:26range function with steps by jack.chen
  3. 2016-05-30 13:12:18iter: Iterator Types by 蟋蟀MM
  4. 2017-03-06 09:54:00Use int() by 阮小七
  5. 2016-03-11 09:26:16Zip function demo: returns a list of tuples by 山药
  6. 2016-04-23 15:00:27Reduce function with add by Solon.Ring
  7. 2016-04-24 09:03:59Functional Programming Tools: map by wubai
  8. 2016-05-30 13:32:59Reduce: lambda function inside by wubai
  9. 2016-08-18 21:38:22dir() Function: find out which names a module defines by 张宋付
  10. 2017-03-06 10:11:29Join list to a string by jack.chen
  11. 2015-12-29 10:15:31Displaying location, type and value for a sum by 张宋付

发表评论