''' Purpose: introduce looping. the program processes the words in a string one-by-one. ''' # get name text = input( "Enter name: " ) print() # split the text into a list of words list_of_words = text.split() # print the words in list_of_words accompanied by their lengths for current_word in list_of_words : # process the current word length_of_current_word = len( current_word ) # determine current word length print( current_word, ':', length_of_current_word ) # print wanted info