码迷,mamicode.com
首页 > 其他好文 > 详细

lambd的使用ret = filter(lambda x : x > 22 ,[11,22,33,44])

时间:2016-12-23 18:47:57      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:style   bsp   div   python   使用   span   nbsp   pre   lte   

1 #!/usr/bin/env python
2 #def f1(x) :
3  #   return x > 22
4 ret = filter(lambda x : x > 22 ,[11,22,33,44])
5 print(ret)
6 for i in ret :
7     print(i)

 

lambd的使用ret = filter(lambda x : x > 22 ,[11,22,33,44])

标签:style   bsp   div   python   使用   span   nbsp   pre   lte   

原文地址:http://www.cnblogs.com/shiluoliming/p/6215670.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!