wordfreq
Anonymous
python
10/12/2022 10:49 AM
400 B
18
Indexable
st1 = 'Python is an interpreted high level language'
st2 = 'Python is easier than any to other language'
wordlist = (st1+' '+st2).split()
wordfreq = dict()
for word in set(wordlist):
wordfreq.setdefault(wordlist.count(word), list())
wordfreq[wordlist.count(word)].append(word)
print(wordfreq)Editor is loading...