Module that count unique chars in string or file
Project description
Character Counter
This Python application allows you to count the number of unique characters in a provided string or a text file.
Usage
Running the Application
Navigate to the src
directory and run the command_line.py
script with the desired options:
python -m command_line.py --string "your_string_here"
or
python -m command_line.py --file /path/to/your/text_file.txt
Function Details
count_unique_chars(string=None, file_path=None)
Count the number of unique characters in the input string.
Parameters:
string
(str): The string in which to count unique characters.file_path
(str): The path to the input text file.
Returns:
int
: The count of unique characters in the input string.
Raises:
TypeError
: If the input is not a string.
Author
Volodymyr Perehuda
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
char_counter_vp-0.0.5.tar.gz
(29.1 kB
view hashes)
Built Distribution
Close
Hashes for char_counter_vp-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d75ee1e3d98c043da5efd4ec52e0bccd42e703d9380a455621ac27bc2604a6eb |
|
MD5 | 94d120b883f6e9ef18064dd6e1f9251c |
|
BLAKE2b-256 | 4e75537f3c55f484b5f0ddbd814656dd0d4c0e3cf4ac009d337fd020b2403096 |