input: Write a function to replace all occurrences of a given string with an alternate string. If the given input string is empty or if the target string is not found, return the original string.
  
  assert replace_string("Hello World!", "World", "Python")=="Hello Python!"
  assert replace_string("This is a test", "is", "was")=="Thwas was a test"
  assert replace_string("No change", "missing", "found")=="No change"
  assert replace_string("", "World", "Python")==""
  assert replace_string("Hello", "", "Python")=="Hello"
output: def replace_string(input_str, target, alt):
      if not input_str or target not in input_str:
          return input_str
      return input_str.replace(target, alt)