This Python 2.7 program accepts a word (string) from user and counts the occurrence of that word in the file chosen by user. In this program, the words with a punctuation either at the beginning or at the end (like: But, ) is also considered if that word matches with the inputted word.
Suppose, if the given word is 'it' and the file is 'alice_short.txt' then the output looks like:
alice_short.txt :
Suppose, if the given word is 'it' and the file is 'alice_short.txt' then the output looks like:
alice_short.txt :
Comments
Post a Comment