Replace many strings at once.
$ pip install git+https://github.com/ttivy/str-replacer.git
or
$ git clone https://github.com/ttivy/str-replacer.git
$ cd str-replacer
$ python setup.py install
import replacer
replacements = {
'src': '<dst>',
'SRC': '<DST>',
}
r = replacer.Replacer(replacements)
r.replace('abcsrcdefABCSRCDEF')
# abc<dst>defABC<DST>DEF