text = "Hello\nWorld\nPython"
lines = text.splitlines()
print(lines)  # 输出: ['Hello', 'World', …
more