I'm puzzle why the below code does not properly pop and extend the list for each zero it identifies.
def move_zeros(array):
array.extend([array.pop(i) for i,x in enumerate(array) if x != 0 and x != False])
return array
A similar post that I reviewed for answers: How to move zeros to the end of a list [closed]