input: Write a function to generate a list of all substrings of a given string in order from longest to shortest. If the input string is empty, return an empty list.
  assert substring_in_order("example")==['example', 'xample', 'ample', 'mple', 'ple', 'le', 'e', 'exampl', 'xampl', 'ampl', 'mpl', 'pl', 'l', 'examp', 'xamp', 'amp', 'mp', 'p', 'exam', 'xam', 'am', 'm', 'exa', 'xa', 'a', 'ex', 'x', 'e']
  assert substring_in_order("test")==['test', 'est', 'st', 't', 'tes', 'es', 's', 'te', 'e', 't']
  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