If last index is reached , then return the highest ( positive ) and lowest ( negative ) values
if ( index + 1 == len ( List ) ) : NEW_LINE INDENT if ( lowest < 0 and highest >= 0 ) : NEW_LINE INDENT return [ highest , lowest ] NEW_LINE DEDENT elif ( lowest <= 0 and highest <= 0 ) : NEW_LINE INDENT return [ None , lowest ] NEW_LINE DEDENT elif ( lowest >= 0 and highest >= 0 ) : NEW_LINE INDENT return [ highest , None ] NEW_LINE DEDENT DEDENT