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.
  assert substring_in_order("abcd") == ["abcd", "abc", "bcd", "ab", "bc", "cd", "a", "b", "c", "d"]
  assert substring_in_order("xyz") == ["xyz", "xy", "yz", "x", "y", "z"]
  assert substring_in_order("") == []
  assert substring_in_order("a") == ["a"]
output: def substring_in_order(s):
      substrings = []
      n = len(s)
      for length in range(n, 0, -1):
          for start in range(n - length + 1):
              substrings.append(s[start:start + length])
      return substrings