input: Write a function to replace all occurrences of a given string with an alternate string in the input string. If the target string is not found in the input string, return the original input string. The function should accept three parameters: the input string, the target string to be replaced, and the replacement string. Return the modified string.
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Hello World!", "Planet", "World")=="Hello World!"
  assert replace_string("Hello World!", "o", "a")=="Hella Warld!"
  assert replace_string("Hello World!", "", "Python")=="Hello World!"
output: def replace_string(input_str, target_str, replacement_str):
      if target_str in input_str:
          return input_str.replace(target_str, replacement_str)
      return input_str