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
Look up the re module (regular expressions). re.search with the regex ' there ' is what you want.