scores = [7, 6, 8, 9, 5] filtered = filter(lambda s: s >= 7, scores) print(list(filtered)) # prints [7, 8, 9]