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 string to be replaced, and the replacement string. The function should return the modified string.
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Python is fun!", "Python", "Java")=="Java is fun!"
  assert replace_string("I love Python and Python is amazing", "Python", "Java")=="I love Java and Java is amazing"
  assert replace_string("No replacement needed", "missing", "found")=="No replacement needed"
  assert replace_string("", "blank", "filled")==""
output: def replace_string(input_str, to_replace, replacement):
      return input_str.replace(to_replace, replacement)