Remove all characters obtained so far
while ( st < i ) : NEW_LINE INDENT if ( ord ( s [ st ] ) >= 65 and ord ( s [ st ] ) <= 90 ) : NEW_LINE INDENT caps [ ord ( s [ st ] ) - 65 ] -= 1 NEW_LINE DEDENT else : NEW_LINE INDENT small [ ord ( s [ st ] ) - 97 ] -= 1 NEW_LINE DEDENT st += 1 NEW_LINE DEDENT i += 1 NEW_LINE st = i NEW_LINE else : NEW_LINE if ( ord ( s [ i ] ) >= 65 and ord ( s [ i ] ) <= 90 ) : NEW_LINE INDENT caps [ ord ( s [ i ] ) - 65 ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT small [ ord ( s [ i ] ) - 97 ] += 1 NEW_LINE DEDENT