# prompt for one or two words and get the response reply = input( 'Enter one or two words: ' ) # turn response into a list list = reply.split() # get the length of the list n = len( list ) # output whether they enter one or two words if ( n == 1 ) : # list size is 1 print( 'one word' ) else : # otherwise, list size is 2 print( 'two words' ) # all done