Run
my_string = "apple\nbanana\ncherry" lines = my_string.splitlines() print(lines)
Output