input: Write a function to generate a Python program which takes a string as input and prints all of its substrings in order from longest to shortest length. The function should return a list containing all substrings, ordered by length from longest to shortest.
  
  def substring_in_order(string): 
      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 
  
  assert substring_in_order("abc")==["abc", "ab", "bc", "a", "b", "c"]
  assert substring_in_order("hello")==["hello", "hell", "ello", "hel", "ell", "llo", "he", "el", "ll", "lo", "h", "e", "l", "l", "o"]
  assert substring_in_order("")==[]
output: def substring_in_order(string): 
      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