hello~ It's my first time to write something on this board.
As you can see the my code, i tried it using little bit different way.
But when it's run with [4 , 5, 5, 4].
it's only remove third index value and i don't know why it's happening.
Plz tell me why and explain how do i can fix this.
Thank you so much.
def purify(list_of_numbers): for x in list_of_numbers: print x if x % 2 != 0: list_of_numbers.remove(x) return list_of_numbers print purify([4, 5, 5, 4])