Python:如何在不同的行上打印包含多个单词的字符串?

use*_*033 2 python string

所以说我有

x = "this string"
Run Code Online (Sandbox Code Playgroud)

我试图在不同的行上打印这两个单词.我想我需要以string.split()某种方式使用,但我不确定如何使用.

eum*_*iro 8

你可以用这个:

print '\n'.join(x.split())
Run Code Online (Sandbox Code Playgroud)

哪里

x = 'this string'
x.split() # ['this', 'string']
Run Code Online (Sandbox Code Playgroud)