FunctionRacerProblemsRace

Zero Positions

EasyNumPyPython

Return a list of the indexes where nums holds a 0, in increasing order. If there are no zeros, return an empty list. Hint: np.nonzero or np.where on a comparison.

Example 1

nums [4,0,3,0,0]
returns [1,3,4]

The zeros are at indexes 1, 3 and 4.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems