""" Purpose: expand input processing capabilities by splitting an input string into its component words """ # Get input reply = input( "What are your three favorite words: " ) # Determine individual words w1, w2, and w3 w1, w2, w3 = reply.split() # GOTCHA: always use parentheses with functions # parentheses says hey i want a function to start up # when you want to use a method on an object, the anatomy is object.method() # the dot operator is the selection operator - we choose a method that is built-in # to all strings # split( reply ) won't work because split() is a string method function # i know this all seems confusing and arbitrary but it will make sense at some point # the split() function will automatically break a string up based on whitespace # number of targets (variables) must match number of words in the string # we can choose to split on a different character by putting it in parentheses # Display results print() print( "Your favorite words:" ) print( w1 ) print( w2 ) print( w3 ) # we previously broke up a string into discrete characters # where each character was assigned to a variable # we are going to be up to our ears in string methods, so if your question is # is there a way to... the answer is probably but hold your horses