源代码
txt = "Thank you for the music\nWelcome to the jungle" x = txt.splitlines(True) print(x)
运行结果