Most occuring word in a string

from collections import Counter
string="This is the string with random number. Also I need to find the most most occuring word in this string. The is The The"
x=Counter(string.lower().split())
print(x.most_common()[0][1])



from collections import Counter
string="This is the string with random number. Also I need to find the most most occuring word in this string. The is The The"
for i in string.lower().split():
print(string.lower().split().count(i),i)

Comments