wordfreq
unknown
python
3 years ago
300 B
6
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...