input: Write a function to generate all substrings of a given string in order from the longest to the shortest length and return them as a list. If the input string is empty, return an empty list.
  
  assert substring_in_order("abc")==["abc", "ab", "bc", "a", "b", "c"]
  assert substring_in_order("")==[]
output: def substring_in_order(s):
      result = []
      n = len(s)
      for length in range(n, 0, -1):
          for start in range(n - length + 1):
              result.append(s[start:start + length])
      return result