There are two text file tags and MobyDick , i have to check how many times a word extracted from the tag file is present in the mobydick.
I have just extracted the words from the text file and saved it in a list, can anyone help with the function to check the frequency of the extracted words of tag file present in mobyDick
below is the code i have written:
with open('tags.txt','r') as f:
words = f.read().split()
#print(words)
with open('MobyDick.txt',encoding='utf8') as g:
text = g.read().split()