会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
淫鬻
博客园
首页
新随笔
联系
订阅
管理
随笔分类 -
python函数
【python内置高阶函数】lambda,reduce,map,filter
摘要:1.lambda匿名函数 #求圆形的面积 import mathdef fun_cir(r): s = math.pi*r*r return sprint(f"s={fun_cir(3)}") print(lambda r:math.pi*7*8) # 报错,<function <lambda> a
阅读全文
posted @
2022-06-15 18:24
淫鬻
阅读(30)
评论(0)
推荐(0)
python函数_itertools【累积和】
摘要:import itertools list1 = [1, 2, 3, 4, 6] result = itertools.accumulate(list1) print(list1) print(list(result)) 输出结果如下:
阅读全文
posted @
2022-06-04 23:05
淫鬻
阅读(37)
评论(0)
推荐(0)
公告