There are two key things you need to do in this program:
(1) loop over all the words in the input
(2) determine whether or not a given word is in your input list.

So where I'd start is to create a program that does each of these separately. Write a function that loops over the input string and prints each word. Don't do anything more than that yet; make sure this works first.

Then add a new function that checks for the existence of a given word in the data file. Just write it so that the user can enter a word and that it looks through the data file and gives you a yes or no output. Call this function *instead of* the one you wrote before.

Then when you've got both of those working you can look at interfacing the two functions with each other, so that the overall program asks for a string, loops through the words, checks each one off against the list then displays the word if it isn't, or does nothing if it is. You'll also need a counter so that you can display the 2 and 7 in the example output you gave.