Write a python program to count the trequency of elements in a list.
(Hint.:L=[10, 20, 10, 30, 40], frequency of 10 is 2.)
Answers
Answered by
1
Answer:
L = int(input().split())
freq = {}
for item in L:
if (item in freq):
freq[item] += 1
else:
freq[item] = 1
for key, value in freq.items():
print ("Frequency of % d is % d"%(key, value))
Similar questions