demo_ref_string_splitlines.py:
txt = "Thank you for the music\nWelcome to the jungle" x = txt.splitlines() print(x)
➜ begtut>python demo_string_splitlines.py
['Thank you for the music', 'Welcome to the jungle']