I would like to do multiple re.sub() replacements on a string and I'm replacing with different strings each time.
This looks so repetitive when I have many substrings to replace. Can someone please suggest a nicer way to do this?
stuff = re.sub('__this__', 'something', stuff)
stuff = re.sub('__This__', 'when', stuff)
stuff = re.sub(' ', 'this', stuff)
stuff = re.sub('.', 'is', stuff)
stuff = re.sub('__', 'different', stuff).capitalize()