input: Write a function to replace all occurrences of a given string with an alternate string. The function should take three parameters: the input string, the target string to be replaced, and the replacement string. The function should return the input string with all occurrences of the target string replaced by the replacement string. If the target string is not found in the input string, the function should return the original input string unchanged.
  assert replace_string("Hello World!", "World", "Python") == "Hello Python!"
  assert replace_string("The cat in the hat.", "cat", "dog") == "The dog in the hat."
  assert replace_string("Coffee is great.", "tea", "water") == "Coffee is great."
  assert replace_string("", "any", "thing") == ""
  assert replace_string("Repeat repeat repeat", "repeat", "stop") == "Repeat stop stop"
output: def replace_string(input_str, target, replacement):
      return input_str.replace(target, replacement)