酷代码 AI
菜单
服务商

now is the time in the past is the time to get down to the now is the time to work hard for the 其中每个单词之间以空格作为区分,要求统计出每个单词出现的次数,并且统计时不包含空格和标点符号python

```python text = "now is the time in the past is the time to get down to the now is the time to work hard for the" words = text.split() word_count = {} for word in words: if word in word_count: word_count[word] += 1 else: word_count[word] = 1 for word, count in word_count.items(): print(f"{word}: {count}") ``` [2024-10-24 15:12:07 | AI写代码神器 | 103点数解答]

相关提问
聚合导航,免费问AI
实用工具查看更多
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]
数独游戏 [娱乐类]
经典推箱子 [娱乐类]
AI摸鱼五子棋 [娱乐类]