Skip to content

Counts and displays to the console the number of each character in a file

Notifications You must be signed in to change notification settings

gregdardis/character-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Character Counter

Description

Character counter is a class that can be instantiated with a text file path, and will hold the text file open and can print the count of each character in the file to the console.

Demo

  1. Clone the repo
  2. cd character-counter
  3. python counter.py

Usage

# demo.py
from counter import CharacterCounter

counter = CharacterCounter(file_path) # e.g. sample.txt
counter.display_char_counts()

About

Counts and displays to the console the number of each character in a file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages