The module counts how many unique characters are in the string or file it is processing.
Project description
Counting Unique Characters
This module allows you to count the unique characters that it receives upon entry. Works with files and strings.
Getting started
A variable args is created to which all the arguments that were passed
to the CLI during the execution of the create_parser() function are assigned.
In function file_check() receives an object args as an input and determines the type:
- if
argscontains a file, then theload_file()file handler function is run and the contents of the file are passed to theunique_characters()function; - if
argsdoes not contain a file, butargscontains a string, then that string is passed to theunique_characters()function
The unique_characters() function processes the string passed to it
and returns the number of unique characters in that string.
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
File details
Details for the file unique_characters_TurchinskiyD-0.0.1.tar.gz.
File metadata
- Download URL: unique_characters_TurchinskiyD-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7b9adb38757c25d5270001fa7e2fb951cacdafb05c0eb486415aec07a59cd08
|
|
| MD5 |
0776a8757ffa20c327583e066c9d5b96
|
|
| BLAKE2b-256 |
d1632cb5fe49733128989ce27d1962c9c358c5f1f0beaf4ab9b14a5469239643
|