<human>:  What is a good Python function to resub multiple replacements.
<bot>: Here is a Python function to resub multiple replacements

import re

def re_sub_multiple(string, pattern, replacement):
  """
    Replaces all instances of pattern in string with replacement
  :param string:
  :param pattern:
  :param replacement:
  :return:
  """
  return re.sub(pattern, replacement, string)

# Enter the string
string = "This is a string"

# Enter the pattern
pattern = "This is a pattern"

# Enter the replacement
replacement = "This is a replacement"

# Calling the function
print((re_sub_multiple(string, pattern, replacement)))

#Example Output
# This is a string

#Remember to inspect code for bugs.