0

I have one text file with some data. now i have a list of keywords in other text file file.

Now i want to do the maching so that i can find out how many keywords from the second text file are in the first file.

I am not a big programmer , so is there any easy way to do this

Mirage
  • 30,868
  • 62
  • 166
  • 261

1 Answers1

0

Provided both the files are not huge, this could be a solution

f=open("textfile")
f2=open("keywordfile")
text=f.read().split()
keyword=f2.read.split()
print list(set(text)&set(keyword))

Note: The above code is in python

spicavigo
  • 4,116
  • 22
  • 28