Run »
txt = "Thank you for the music\nWelcome to the jungle" x = txt.splitlines() print(x)
['Thank you for the music', 'Welcome to the jungle']