input: Write a function to generate a list of all substrings of a given string in order from longest to shortest. If the given string is empty, return an empty list. For example, for the input string "abcd", the function should return ['abcd', 'bcd', 'cd', 'd', 'abc', 'bc', 'c', 'ab', 'b', 'a'].
  
  assert substring_in_order("abcd")==['abcd', 'bcd', 'cd', 'd', 'abc', 'bc', 'c', 'ab', 'b', 'a']
  assert substring_in_order("xyz")==['xyz', 'yz', 'z', 'xy', 'y', 'x']
  assert substring_in_order("")==[]
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