input: Write a function to replace all occurrences of a given string with an alternate string. The function should take three arguments: the input string, the target string to be replaced, and the replacement string. Return the modified string. If the target string does not exist in the input string, return the original input string.
  
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Hello World!", "World", "Universe")=="Hello Universe!"
  assert replace_string("This is a test", "test", "example")=="This is a example"
  assert replace_string("Nothing to replace here", "missing", "found")=="Nothing to replace here"
  assert replace_string("", "anything", "something")==""
output: def replace_string(input_str, target, replacement):
      if target in input_str:
          return input_str.replace(target, replacement)
      return input_str