input: from typing import List
  
  
  def largest_to_smallest(string: str) -> List[str]:
      """ Generate a list of all substrings of the given string in order from longest to shortest length.
      >>> largest_to_smallest('abcd')
      ['abcd', 'bcd', 'abc', 'bcd', 'cd', 'ab', 'bc', 'cd', 'd', 'a', 'b', 'c']
      >>> largest_to_smallest('xyz')
      ['xyz', 'yz', 'xy', 'yz', 'z', 'x', 'y']
      """
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