Write a program in Python to read from a text file “TRIP.TXT” and count the number of “THE” present in the file. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
- 4

Write a program in Python to read from a text file “TRIP.TXT” and count the number of “THE” present in the file.

13th Jun 2021, 1:46 PM
Pramod Attri
Pramod Attri - avatar
2 ответов
+ 6
Pramod Attri , before we can help you, you should show us your attempt first. if you have not done a try by yourself upto now, please do so. Put your code in playground and link it here. thanks!
13th Jun 2021, 2:06 PM
Lothar
Lothar - avatar
+ 2
in addition to providing your own attempt, you should also say if the task requirement want to count "THE" present in file as single words (or also as subwords) and if the match should be case sensitive or not ^^
13th Jun 2021, 5:43 PM
visph
visph - avatar