input: Write a function to replace all occurrences of a given string with an alternate string in the input string. Return the modified string.
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Python is fun, Python is great", "Python", "Java")=="Java is fun, Java is great"
  assert replace_string("No replacements needed", "replace", "substitute")=="No substitutions needed"
  assert replace_string("", "anything", "nothing")==""
  assert replace_string("Exact match only", "match", "match")=="Exact match only"
output: def replace_string(input_str, old_str, new_str):
      return input_str.replace(old_str, new_str)