主页
Python
Python String splitlines() 方法
demo_ref_string_splitlines
运行 ❯
×
更改方向
保存代码
更改主题
txt = "Thank you for the music\nWelcome to the jungle" x = txt.splitlines() print(x)
['Thank you for the music', 'Welcome to the jungle']