Skip to main content

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


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)

Uploaded Source

Built Distribution

char_counter_vp-0.0.5-py3-none-any.whl (27.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page