📜  python 过滤器函数 - Python 代码示例

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

代码示例6
number_list = range(-5, 5)
less_than_zero = list(filter(lambda x: x < 0, number_list))
print(less_than_zero)

# Output: [-5, -4, -3, -2, -1]