1scores = [70, 60, 80, 90, 50]
2filtered = filter(lambda score: score >= 70, scores)
3
4print(list(filtered))
5
6# Output:
7[70, 80, 90]
1scores = [70, 60, 80, 90, 50]
2filtered = filter(lambda score: score >= 70, scores)
3
4print(list(filtered))
5Code language: Python (python)