I have a list of strings, and I want to remove all texts after the "\n" in that list each row (including "\n"). How can I do that?
I tried to use the partition function, but it doesn't work with the list...
my_list =["Today is a good day.\nLet's go outside","I have a cat to feed.\nI need go home now."]
Expected result:
my_list =['Today is a good day.','I have a cat to feed.']
Thanks for all the help