hi. what is the most pythonic way to substitute substrings? eg: i want to apply: foo --> bar baz --> quux quuux --> foo so that: fooxxxbazyyyquuux --> barxxxquuxyyyfoo bye