I want to search and match a particular word in a text file.
with open(\'wordlist.txt\', \'r\') as searchfile: for line in searchfile: if
split the line into tokens: if word in line.split():
if word in line.split():