I'm working on a problem where I need to go through the items of a passage and identify the words that are "unknown". I have two lists.
The first (the passage):
["this","is","a","test","does","it","work"]
And a list of "known" words:
["this","is","a","test"]
I'm a pretty elementary coder in Python, so I'm trying to use nested for-loops, going through the items of the passage list checking them against the words in the "known" list, but I'm facing some problems.
for word in passage:
    for word1 in known:
        if word == word1:
            print word + " "
        else:
            print "* " + word + " * "   
The expected result would be >>>"this is a test * does * * it * * work *"
 
     
     
     
    