Measure some strings: : Length « String « Python Tutorial






a = ['cat', 'window', 'defenestrate']
for x in a:
    print x, len(x)








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: