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. Return the modified string.
  
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("I love programming in Python", "Python", "Java")=="I love programming in Java"
  assert replace_string("This is a test", "test", "example")=="This is a example"
  assert replace_string("No change needed", "missing", "new")=="No change needed"
  assert replace_string("", "", "anything")==""
output: def replace_string(input_str, target, replacement):
      return input_str.replace(target, replacement)