input: 
  from typing import List
  
  def substring_in_order(string: str) -> List[str]:
      """
      Generates all substrings of a given string in order from longest to shortest length.
      
      >>> substring_in_order("abcd")
      ['abcd', 'bcd', 'cd', 'd', 'abc', 'bc', 'c', 'ab', 'b', 'a']
      >>> substring_in_order("python")
      ['python', 'ytho', 'tho', 'ho', 'o', 'pytho', 'yth', 'th', 'h', 'pyth', 'yth', 'yt', 't', 'pyt', 'yt', 'y', 'py', 'y', 'p']
      """
      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
  
output:     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