input: Write a function to generate a list of all substrings of a given string in order from longest to shortest length. The function should return the list of substrings. If the input string is empty, the function should return an empty list.
  
  assert substring_in_order("abc") == ["abc", "ab", "bc", "a", "b", "c"]
  assert substring_in_order("hello") == ["hello", "hell", "ello", "hel", "ell", "llo", "he", "el", "ll", "lo", "h", "e", "l", "l", "o"]
  assert substring_in_order("") == []
  assert substring_in_order("a") == ["a"]
output: def substring_in_order(s):
      substrings = []
      n = len(s)
      for length in range(n, 0, -1):
          for start in range(n - length + 1):
              substrings.append(s[start:start + length])
      return substrings