input: Write a function to generate a list of all substrings of a given string in order from longest to shortest length. Return the list of substrings.
  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("abc")==['abc', 'ab', 'bc', 'a', 'b', 'c']
  assert substring_in_order("apple")==['apple', 'appl', 'pple', 'app', 'ppl', 'ple', 'ap', 'pp', 'pl', 'le', 'a', 'p', 'p', 'l', 'e']
  assert substring_in_order("")==[]
  assert substring_in_order("a")==['a']
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