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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file char_counter_vp-0.0.5.tar.gz.

File metadata

  • Download URL: char_counter_vp-0.0.5.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for char_counter_vp-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b9d281f975faf32f04764b8d4749783453f018d2934572d93d342633dbd964f3
MD5 d679f42d6da75631703de87306ced8fb
BLAKE2b-256 ea2831d425f06d5f0e67a535a2d2e58e6f07a9a48e7c3f3c8327ce0379ab5e72

See more details on using hashes here.

File details

Details for the file char_counter_vp-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for char_counter_vp-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d75ee1e3d98c043da5efd4ec52e0bccd42e703d9380a455621ac27bc2604a6eb
MD5 94d120b883f6e9ef18064dd6e1f9251c
BLAKE2b-256 4e75537f3c55f484b5f0ddbd814656dd0d4c0e3cf4ac009d337fd020b2403096

See more details on using hashes here.

Supported by

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