input: Write a function to generate a list of all substrings of a given string, ordered from the longest substrings to the shortest substrings. If the input string is empty, return an empty list.
  def substring_in_order(string): 
      result = [] 
      n = len(string) 
      for l in range(n, 0, -1): 
          for i in range(n-l + 1): 
              result.append(string[i:i+l]) 
      return result 
  
  assert substring_in_order("abcd") == ['abcd', 'bcde', 'cdef', 'defg', 'bcd', 'cde', 'def', 'efg', 'cd', 'de', 'ef', 'fg', 'd', 'e', 'f', 'g']
  assert substring_in_order("") == []
  assert substring_in_order("a") == ['a']
  assert substring_in_order("xyz") == ['xyz', 'yzx', 'zxy', 'yx', 'xy', 'zx', 'yz', 'xz', 'x', 'y', 'z']
output: def substring_in_order(string): 
      result = [] 
      n = len(string) 
      for l in range(n, 0, -1): 
          for i in range(n-l + 1): 
              result.append(string[i:i+l]) 
      return result