python学习 匿名函数
2016-07-29 11:34
369 查看
#lambda 没有名字的函数,特别简单的函数,只有return语句的函数 #语法 lambda 返回值 def hello(x): return x[1] print hello([1,2]) hello=lambda x:x[1] hello1=lambda x:x[0]+x[1] hello2=lambda x,y:x*y print hello([1,2]) print hello1([3,4]) print hello2(2,3)
本文出自 “不抛弃!不放弃” 博客,谢绝转载!
相关文章推荐
- python学习-匿名函数
- python学习之---匿名函数,返回函数,偏函数
- python学习笔记,返回函数,匿名函数,装饰器
- python学习:匿名函数
- Python学习 – 匿名函数
- 我的python学习之路--列表表达式及匿名函数lambda
- python学习总结---lambda匿名函数
- 【Python】学习笔记——-5.3、匿名函数
- python学习记录---匿名函数
- Python学习笔记5:上周回顾(匿名函数、文件)
- Python学习 Day 5 高阶函数 map/reduce filter sorter 返回函数 匿名函数 装饰器 偏函数
- Python学习笔记-匿名函数
- 王亟亟的Python学习之路(10)-匿名函数
- Python学习札记(二十五) 函数式编程6 匿名函数
- Python学习3--返回函数 、匿名函数、装饰器、偏函数
- python 学习笔记---匿名函数 装饰器 偏函数
- 王亟亟的Python学习之路(10)-匿名函数
- 【Python学习笔记】函数式编程:匿名函数lambda
- Python学习(九)——匿名函数、装饰器、偏函数
- python学习—Day35-1—匿名函数、内建函数