input: 
  def generate_substrings(string: str) -> List[str]:
      """ Generate a list of all substrings of the input string in order from longest to shortest length.
      >>> generate_substrings('abc')
      ['abc', 'ab', 'bc', 'a', 'b', 'c']
      >>> generate_substrings('hello')
      ['hello', 'hell', 'ello', 'hel', 'ell', 'llo', 'he', 'el', 'll', 'lo', 'h', 'e', 'l', 'l', 'o']
      """
  
output:     substrings = []
      for i in range(len(string)):
          for j in range(i + 1, len(string) + 1):
              substrings.append(string[i:j])
      substrings.sort(key=len, reverse=True)
      return substrings