📜  python 从列表中过滤数字 - Python 代码示例

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

代码示例1
scores = [7, 6, 8, 9, 5]
filtered = filter(lambda s: s >= 7, scores)

print(list(filtered))
# prints [7, 8, 9]