📜  在 python 中映射和过滤 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:21.307000             🧑  作者: Mango

代码示例1
>>> doubled_odds = map(lambda n: n * 2, filter(lambda n: n % 2 == 1, numbers))
>>> doubled_odds = [n * 2 for n in numbers if n % 2 == 1]