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

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

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])