Write a function, countChar(STRING), that takes a string as an argument and returns a dictionary containing the frequency of each character in the string.
For example, if the string is "Hello world", the output will be
{'H': 1, 'e': 1, 'l': 3, 'o': 2, ' ': 1, 'w': 1, 'r': 1, 'd': 1}
Answer:
Answer by student
Detailed answer by teachoo
The rest of the post is locked. Join Teachoo Black to see the full post.