this is my code.
Oops, try again. Your function crashed on [4, 5, 5, 4] as input because your function throws a "list index out of range" error.
how to handle this error ,what am i doing wrong?
def purify(l): for i in range(len(l)): if l[i]%2!=0: del l[i] return l