s = 'this is a sentence sentence sentence'
list_split = s.split(' ')
print(list_split) # ['this', 'is', 'a', 'sentence', 'sentence', 'sentence']
print(len(list_split))
result = {}
for word in list_split:
if result.get(word, None):
result[word] += 1
continue
result[word] = 1
print(result) # {'is': 1, 'a': 1, 'this': 1, 'sentence': 3}
追问只需要求词语个数,以及平均每个词多少字母呢?