My program that takes a string as an input from the user and counts the frequency of each character using the dictionary. Input:
Python programming is fun
Expected output:
{'p': 2, 'y': 1, 't': 1, 'h': 1, 'o': 2, 'n': 3, 'r': 2, 'g': 2, 'a': 1, 'm': 2, 'i': 2, 's': 1, 'f': 1, 'u': 1}
My code:
string = input().lower()
dicx = {}
count = 0
for i in string:
dicx['i'] = ''
print(dicx)