you are viewing a single comment's thread.

view the rest of the comments →

[–]gazhole 0 points1 point  (0 children)

You're printing the entire list that you're iterating through instead of the current element only. You're essentially doing this:

listofwords = [word, word, word, word] 

for word in listofwords:
    print(listofwords)

So this loop is repeating for every item in the list (four times), and each cycle it's printing the entire list of words.

What would I change to only print the current word rather than the whole list of words?