• Problems with solution checking.

Question related to mission Remove All Before

 

Hello, I´m a beginner so I´ve must missed something... in the last sequence check, the sequence is [10, 1, 5, 6, 7, 10], and the border is 5, so the solution is [5,6,7,10]. My problems is understanding why the first '10' in the sequence is removed instead of preserved. Please help me understanding. Thanks in advance.

My code:

from collections.abc import Iterable # def removeallbefore(items: list, border: int) -> Iterable: if items.count(border)==0: return items else: newit=[] for item in items: if item>=border: newit=newit+[item] return newit