📅  最后修改于: 2022-03-11 14:46:06.139000             🧑  作者: Mango
##Write a Python program to input a string that is a list of words separated by commas.
##Construct a dictionary that contains all these words as keys and their frequencies as values.
##Then display the words with their quantities.
lst = []
d = dict()
user = input ("enter a string ::-- ")
lst = user.split(',')
print("LIST ELEMENR ARE :: ",lst)
l = len(lst)
for i in range(l) :
c = 0
for j in range(l) :
if lst[i] == lst[j ]:
c += 1
d[lst[i]] = c
print("dictionary is :: ",d)