Computer Science, asked by gouthamsv05, 3 months ago

Write a function in Python that counts the number of "This" or "These" words present in a text file "STORY.TXT.​

Answers

Answered by dangding403
1

Answer:

file = open("C:\data.txt", "rt")

data = file.read()

words = data.split()

Answered by nehaprasanth1889
0

Answer:

f=open("story.txt","r")

x=f.read()

y=x.count("This")+x.count("These")

print(y)

f.close()

Explanation:

Similar questions