Separate Positive and Negative elements
for i in range ( n ) : NEW_LINE INDENT if ( a [ i ] >= 0 ) : NEW_LINE INDENT pos . append ( a [ i ] ) NEW_LINE DEDENT else : NEW_LINE INDENT neg . append ( a [ i ] ) NEW_LINE DEDENT DEDENT