take a string and display it in a loop. : Length « String « Python Tutorial






# Each time through we would like to chop off the last character. 

s = 'abcde'
i = -1
for i in range(-1, -len(s), -1):
    print s[:i]








5.13.Length
5.13.1.Get the length of an input string
5.13.2.range() with len() for indexing into a string
5.13.3.take a string and display it in a loop.
5.13.4.Get the final index of our string is:
5.13.5.Measure some strings: