我是小瘦子哟

关注

python filter

我是小瘦子哟

关注

阅读 97

2023-01-16


a = [1, 2, 3, 4, 5, 6]
b = filter(lambda x: x % 2 == 1, a)
print(list(b))

[1, 3, 5]


相关推荐

认真的老去

Python filter()

认真的老去 59 0 0

早安地球

Python filter 和map

早安地球 89 0 0

小黑Neo

python内置函数filter()

小黑Neo 64 0 0

有态度的萌狮子

python filter()和map()

有态度的萌狮子 63 0 0

高子歌

python之过滤函数filter

高子歌 67 0 0

腊梅5朵

python 多条件 orm filter

腊梅5朵 66 0 0

滚过红尘说红尘

python--sorted、filter、map

滚过红尘说红尘 66 0 0

蓝莲听雨

python3 filter函数

蓝莲听雨 22 0 0

elvinyang

Python高阶函数Map、Filter、Reduce

elvinyang 170 0 0

扶摇_hyber

Python内置函数filter和map

扶摇_hyber 84 0 0

精彩评论(0)

0 0 举报