Try the following:
import re
s = re.sub('{{.*?}}', '', s)
Note that {both }are usually special characters in regular expressions and should usually be escaped with a backslash to get their literal meaning. However, in this context they are interpreted as literals.
See how it works on the Internet: ideone
source
share