01 / 06
You do not want all of them
"From a list of scores, collect only the ones that passed." This time it is not about changing every one but about keeping only some.
Written with for, you loop, check with if, and append only what gets through.
scores = [80, 45, 60]passes = []for s in scores: if s >= 60: passes.append(s)print(passes)Result
[80, 60]