Replace a list of strings within a string with a list of replacement strings.
Is there a function that will replace a list of strings within a string with a list of replacement strings?
Ex. Pseudo Code:
string1 = "The big brown dog jumped over the big log."
list1 = "big, brown, dog, log"
list2 = "little, black, cat, flower"
string2 = replace(string1, list1, list2)
print string2
Output:
The little black cat jumped over the little flower.
|