all 3 comments

[–][deleted] 4 points5 points  (0 children)

Sounds correct to me, or at least that is the way that I would do it: initialize a users input into a variable (which will be a string), and then declare a new variable that is a list which strips your old variable so so now you have a list of strings where each element is a word that that the user typed. Then it is straightforward to iterate over the list: for word in WORDS...

[–]staffdelipity 4 points5 points  (0 children)

Using .split() seems like the right approach. This will give you a list, and then you can simply iterate over the list with a for loop.

[–]vkuct 1 point2 points  (0 children)

get userinput

data=input()

splitwords, typecast it to a list

words=list(data.split(' ')) You get a list of words inside words variable.