关于编写程序的一个问题

英文分词。要求:程序运行时,输入一句英文(不带标点),按空格分词后,将单词输出。我也搜了,可是好像不对,这是我搜出来的方案,它好像不符合要求

  • 用字符串'I am a Chongqing old man'试炼

    img

  • 代码

#!/sur/bin/nve python
# coding: utf-8

words = 'I am a Chongqing old man'

for word in words.split():
    print(word)