input: 
  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("example")
      ['example', 'exampl', 'xample', 'examp', 'xampl', 'ample', 'exam', 'xam', 'am', 'exa', 'xa', 'ample', 'exam', 'xam', 'ample', 'exa', 'xa', 'ample', 'e', 'x', 'a', 'm', 'p', 'l', 'e']
      >>> substring_in_order("abc")
      ['abc', 'ab', 'bc', 'a', 'b', 'c']
      """
      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
  
  string = input("Enter the string: ") 
  print ("All substrings in order from longest to shortest:") 
  print (substring_in_order(string))
  
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
  