input: Write a function that accepts a string, a start index, and an end index, then returns the slice of the string from the start index (inclusive) to the end index (exclusive). If the start or end index is out of bounds, the function should return an empty string. If the input string is empty, the function should return an empty string as well.
  
  def string_slice(string, start_index, end_index):
      if not string or start_index >= len(string) or end_index <= 0:
          return ""
      return string[start_index:end_index]
  
  assert string_slice("This is a slicing test", 8, 15)=="slice"
  assert string_slice("Hello, world!", 7, 12)=="world"
  assert string_slice("Python", 1, 10)==""
  assert string_slice("Short", -1, 3)==""
  assert string_slice("", 2, 5)==""
output: def string_slice(string, start_index, end_index):
      if not string or start_index >= len(string) or end_index <= 0:
          return ""
      return string[start_index:end_index]