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. It should return the modified string with all occurrences of the target string replaced by the replacement string.
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("I am learning Python", "Python", "programming")=="I am learning programming"
  assert replace_string("This is a test", "is", "was")=="Thwas was a test"
  assert replace_string("No changes needed", "notfound", "replacement")=="No changes needed"
  assert replace_string("", "anything", "replacement")==""
output: def replace_string(input_str, target, replacement):
      return input_str.replace(target, replacement)