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, return the input string as is.
  
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("Hello World!", "Hello", "Hi")=="Hi World!"
  assert replace_string("Python is great", "great", "awesome")=="Python is awesome"
  assert replace_string("", "Hello", "Hi")==""
output: def replace_string(input_str, old_str, new_str):
      if not input_str:
          return input_str
      return input_str.replace(old_str, new_str)