''' Purpose: examine a list of words ''' # get text from user reply = input( 'Enter text: ' ) print() # split text into words words = reply.split() # let's see what we got print( 'Supplied text =', reply ) print( 'words =', words ) print() # analyze text for w in words : # get current word's length len_w = len( w ) # echo current word and it's length print( w, ":", len_w )