#! -*- coding:utf-8 -*-
#Python菜鸟lambda学习
#菜农[email protected] 2019.4.16
filter_me = [1, 2, 3, 4, 6, 7, 8, 11, 12, 14, 15, 19, 22]
result = filter(lambda x: x % 2 == 0, filter_me)
res = filter(lambda x: x & 1 > 0, filter_me)
for i in filter(lambda x: x & 1, range(10)):
    print(i)
    
print(*res)
print(*result)
print(filter_me)
print(*filter_me)

菜农Python菜鸟学习笔记lambda学习

相关文章:

  • 2021-11-23
  • 2021-11-30
  • 2021-12-11
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
猜你喜欢
  • 2021-11-28
  • 2021-11-20
  • 2021-09-22
  • 2021-11-28
  • 2021-05-30
  • 2021-07-19
  • 2021-12-22
相关资源
相似解决方案