Compare the new prefix with previous prefix
if ( len ( temp_prefix ) > len ( new_prefix ) ) : NEW_LINE INDENT res [ ind ] = temp_prefix NEW_LINE ind += 1 NEW_LINE DEDENT else : NEW_LINE INDENT res [ ind ] = new_prefix NEW_LINE ind += 1 NEW_LINE DEDENT