input: from typing import List
  
  def substring_in_order(string: str) -> List[str]:
      """Generate 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', 'th', 'h', 'yp', 'p', 'y', 'yt', 'th', 'ho', 'on', 'p', 'y', 'tt', 'o', 'th', 'n']
      """
output:     substrings = []
      length = len(string)
      for i in range(length):
          for j in range(i + 1, length + 1):
              substrings.append(string[i:j])
      substrings.sort(key=len, reverse=True)
      return substrings