Skip to content

Conversation

@gouriphadnis0301
Copy link

This pull request adds a solution for Problem 0004 from the "Show-Me-the-Code" Python exercises.

Key features of the solution:

  1. Reads a plain text file and counts the occurrence of each word.
  2. Cleans punctuation and converts all words to lowercase for accurate counting.
  3. Prints the top 20 most frequent words in the console.
  4. Saves the full word counts to a text file named 'word_count.txt'.
  5. Demonstrates Python basics such as loops, string manipulation, file I/O, and usage of collections.Counter.

This solution is self-contained, easy to read, and can be run directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant