Write a function in Python that counts the number of "This" or "These" words present in a text file "STORY.TXT.
Answers
Answered by
1
Answer:
file = open("C:\data.txt", "rt")
data = file.read()
words = data.split()
Answered by
0
Answer:
f=open("story.txt","r")
x=f.read()
y=x.count("This")+x.count("These")
print(y)
f.close()
Explanation:
Similar questions