rep = {'condition1': '', 'condition2': 'text'}
rep = dict((re.escape(k), v) for k, v in rep.items())
pattern = re.compile('|'.join(list(rep.keys())))
text = pattern.sub(lambda m: rep[re.escape(m.group(0))], text)
Python replace multiple strings