Count number of occurrence of a charterer in the string
mp = dict ( ) NEW_LINE for i in range ( n ) : NEW_LINE INDENT if string [ i ] in mp . keys ( ) : NEW_LINE INDENT mp [ string [ i ] ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT mp [ string [ i ] ] = 1 NEW_LINE DEDENT DEDENT