• problem with solution

Question related to mission Remove All Before

 

I don't know what I did wrong, here's my code (I'm beginner and I know it isn't very professional):

def remove_all_before(list, border):
for x in range(border):
    del list[0]
return list

and here's good solution:

def remove_all_before(items: list, border: int):

if border in items:
    return items[items.index(border):]
else:
    return items

could somebody explain it to me?

9