📜  循环遍历字符串中的单词 python 代码示例

📅  最后修改于: 2022-03-11 14:46:24.751000             🧑  作者: Mango

代码示例1
str = 'Hello! I am Robot. This is a Python example.'

#split string
splits = str.split()

#for loop to iterate over words array
for split in splits:
    print(split)