input: Write a python function to replace a given pattern with a different string.
  assert replace_pattern("Hello world!", "Hello", "Goodbye") == "Goodbye world!"
  assert replace_pattern("This is a test", "test", "success") == "This is a success"
  assert replace_pattern("apple orange apple", "apple", "banana") == "banana orange banana"
output: def replace_pattern(text, pattern, replacement):
      return text.replace(pattern, replacement)