Computer Science, asked by gouthamsv05, 6 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 komalatejasri
7

Answer:

Python – Count Number of Words

1.Open the file in read mode and handle it in text mode.

2.Read the text using read() function.

3.Split the text using space separator. ...

4.The length of the split list should equal the number of words in the text file.

5.You can refine the count by cleaning the string prior to splitting or validating the words after splitting.

Explanation:

plz mark me as brainlist and plz follow me guys plz plz

Similar questions