I would like to remove the repeated substring from a list of strings. *Assuming that the repeated substring is different for each list.
Example:
lst = ['State your favorite fruit: Apple', 'State your favorite fruit: Orange', 'State your favorite fruit: Grapes']
Desired outcome:
final_lst = ['Apple', 'Orange', 'Grapes']
Edit: Sorry if my initial question was not clear. I hope to find the unique words from each list of strings.
lst1 = ['This is a bag', 'This is a cat', 'This is a dog']
lst2 = ['Favorite drink: Cola', 'Favorite drink: Sprite']
lst3 = ['My name is James', 'My name is Mary Jane', 'My name is Lopez']
Desired output:
final_lst1 = ['bag', 'cat', 'dog']
final_lst2 = ['Cola', 'Sprite']
final_lst3 = ['James', 'Mary Jane', 'Lopez']