#K85762. Case-Insensitive Character Frequency Counting
Case-Insensitive Character Frequency Counting
Case-Insensitive Character Frequency Counting
Given a non-empty string consisting exclusively of alphabet characters (both uppercase and lowercase), compute the frequency of each character in a case-insensitive manner. That is, characters such as A and a are considered the same.
The output should be a dictionary literal formatted as follows:
[ { 'a': f_a, 'b': f_b, \dots } ]
where each key is a lowercase letter and f_x is the frequency of that letter in the input string. The dictionary items must be listed in ascending alphabetical order by the character.
Example:
- Input:
aAbBcC
- Output:
{'a': 2, 'b': 2, 'c': 2}
inputFormat
The input consists of a single line containing a non-empty string of alphabet characters. No spaces or other characters are present.
outputFormat
Output the character frequencies in the form of a Python dictionary literal. Each key must be a lowercase letter enclosed in single quotes, and the keys must appear in ascending alphabetical order. There should be no extra spaces except for a single space after each colon and comma as shown in the sample output.
## sampleaAbBcC
{'a': 2, 'b': 2, 'c': 2}