Lecture Notes on 24 Oct 2012 def sub_string (s): length = len (s) for size in range (length, 0, -1): startIdx = 0 endIdx = startIdx + size while (endIdx <= length): print (s[startIdx : endIdx]) startIdx = startIdx + 1 endIdx = startIdx + size def main(): sub_string ("ABCDE") main()