#C12341. Count Characters (Case Insensitive)
Count Characters (Case Insensitive)
Count Characters (Case Insensitive)
Given a string S, count the occurrences of each character in a case-insensitive manner. That is, for each character in S, convert it to lowercase and then count its frequency. The output should be printed as a dictionary with keys in the order in which they first appear in S.
For example, if S = "HelloWorld", the output should be:
{'h': 1, 'e': 1, 'l': 3, 'o': 2, 'w': 1, 'r': 1, 'd': 1}
Note that non-alphabetical characters are counted as-is (after converting any letters to lowercase).
inputFormat
A single line string read from standard input representing the text to be analyzed.
outputFormat
Print a dictionary representing the count of each character in the string. The keys must appear in the order of their first occurrence. Format the dictionary exactly as shown in the examples (using single quotes for keys).## sample
HelloWorld
{'h': 1, 'e': 1, 'l': 3, 'o': 2, 'w': 1, 'r': 1, 'd': 1}