Push all zeros to tail of int array
The function does not preserve object identity. Zeros of other types get replaced with an integer:

&gt;&gt;&gt; nonzero([0, 0.0, 0j])
[0, 0, 0]


If the input only ever contains integers, then this isn't a problem, but it's worth remembering that Python has several different types of number.
The docstring is not quite right. "push all the zeros to the end" implies that the input array is modified, but that's not true: a new array is created and returned.
There's a neat trick for implementing this:

def nonzero(a):
    """Return a copy of the iterable a with all zeros at the end."""
    return sorted(a, key=lambda x: x == 0)


This works because False compares less than True, and because Python's sort is guaranteed to be stable: it never changes the relative order of elements with the same sort key.