Count occurrences of individual lower case and upper case characters
lCount = [ 0 for i in range ( MAX ) ] NEW_LINE uCount = [ 0 for i in range ( MAX ) ] NEW_LINE s = list ( s ) NEW_LINE for i in range ( n ) : NEW_LINE INDENT if ( s [ i ] . isupper ( ) ) : NEW_LINE INDENT uCount [ ord ( s [ i ] ) - ord ( ' A ' ) ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT lCount [ ord ( s [ i ] ) - ord ( ' a ' ) ] += 1 NEW_LINE DEDENT DEDENT