摘要: 高阶函数 将函数作为参数 例如 1 def sum_naturals(n): 2 total, k = 0, 1 3 while k <= n: 4 total, k = total + k, k + 1 5 return total def sum_cubes(n): total, k = 0, 阅读全文
posted @ 2017-06-20 17:49 elieyes 阅读(662) 评论(4) 推荐(0) 编辑