I am trying to count the frequency of each digit as a single digit in a list. for example 1:5 times, 2: 4 times but i am not getting the individual count. Here is my code
def CountFrequency(my_list):
freq = {}
for item in my_list:
if (item in freq):
freq[item] += 1
else:
freq[item] = 1
for key, value in freq.items():
print ("% d : % d"%(key, value))
my_list =[1, 21, 25, 53, 3, 14, 1, 12, 52, 33]
print(CountFrequency(my_list))