input: Write a function to replace all occurrences of a given string with an alternate string in the input string. If the input string is empty then return the empty string.
  assert replace_string("Hello World!", "World", "Python") == "Hello Python!"
  assert replace_string("The cat in the hat", "cat", "dog") == "The dog in the hat"
  assert replace_string("The quick brown fox", "quick", "slow") == "The slow brown fox"
  assert replace_string("", "anything", "nothing") == ""
  assert replace_string("RepeatRepeatRepeat", "Repeat", "End") == "EndEndEnd"
output: def replace_string(input_str, old_str, new_str):
      if not input_str:
          return ""
      return input_str.replace(old_str, new_str)