Getting error in purify


Please help me on this. I am getting error


remove is a difficult approach this problem, you are removing items from the list you are looping over, this causes problems


Hello Stetim , then what i should use here?


its not that you can not use remove, it is just more challenging. (and not the most efficient solution)

I would make an empty list and append even numbers to this new list, this is by far the easiest approach

If you want, we can look into approaches to make .remove() work


Thanks Stetim. I have got your point