A list of original strings:
Originals = ["nice apple", "orange", "pear sweet", "red ape"]
A list of strings to remove:
To_remove = ["nice ", " sweet"]
What I want to achieve is to remove the strings needed to be removed in each elements in the original words
result: ["apple", "orange", "pear", "red ape"]
I do following but it doesn’t produce a good result.
for t in To_remove:
for o in Originals:
print o.replace(t, "")
what would be the right way? Thank you.