django - Iterative find/replace from a list of tuples in Python -
I have a list of Tupless, each containing a search / change value that I would like to apply to the string. What would be the most effective way to do this? I am applying it in this direction, so performance is my biggest concern.
More firmly, what will the process's innerheads be?
x = 'find1, def process (strings, LST): # come back some something here & gt; & Gt; & Gt; Thanks, all!
"text"> you re.sub
:
Import can be considered using REPLACEMENTS = dict ([('find1', 'replace1'), (DAP duplexer (M): Return replacement [MGP ( 0)] x = 'find1, find2, find3' r = re.compile ('|' .jind (copy.kiz ()) print r shoe (reporter, x)
Comments
Post a Comment