zeroindex list to store indexex of zero
for i in range ( N ) : NEW_LINE INDENT if ( arr [ i ] == 0 ) : NEW_LINE INDENT zeroindex . append ( i ) NEW_LINE DEDENT DEDENT if ( len ( zeroindex ) == 0 ) : NEW_LINE