text = input("请输入一段文本:")
words = text.split()
print(words)
word_count = {}
for word in words:
if word in word_count:
word_count[word] += 1
else:
word_count[word] = 1
print("单词计数结果:")
print(word_count)
for word, count in word_count.items():
print(word, ":", count)