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. If the target string is found in the input string, it should be replaced with the replacement string. Return the modified string.
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Hello World!", "o", "a")=="Hella Warald!"
  assert replace_string("Hello World!", "Foo", "Bar")=="Hello World!"
  assert replace_string("", "World", "Python")==""
  assert replace_string("Hello World!", "", "Python")=="Hello World!"
output: def replace_string(input_str, target_str, replacement_str):
      if target_str == "":
          return input_str
      return input_str.replace(target_str, replacement_str)