I haven't coded in Python for a long time and sometimes I'm quite confused. When I have an array, like eg.: arr = [0, 1, 0, 3, 12] and say:
for i in arr:
if i == 0:
arr.remove(i)
it is removing the two zeroes the way I want. But if the array is something like: arr = [0, 0, 1], with the above method, one 0 will remain. So could someone explain me why the behavior is like that? I don't find an explanation for this.