input: Write a function to replace all occurrences of a given string with an alternate string. If the given string is empty then return the input string without any changes.
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Python is fun", "Python", "Java")=="Java is fun"
  assert replace_string("Hello Hello", "Hello", "Hi")=="Hi Hi"
  assert replace_string("No changes", "Java", "Python")=="No changes"
  assert replace_string("", "Any", "Replacement")==""
output: def replace_string(input_str, old_str, new_str):
      if old_str == "":
          return input_str
      return input_str.replace(old_str, new_str)