Skip to main content

No project description provided

Project description

Count unique characters

This package allows you to protect the unique characters that it receives at the entrance. Works with files and strings.

Getting started

The program receives files as input, processes them and passes them to the script.

parser.add_argument('--word', help='Enter the string')

parser.add_argument('--file', type=argparse.FileType('r'))

arguments = parser.parse_args()

Function run_function

The function receives an object as an input and determines the type, transfers the data to a specific function.

args - object witch is the result of parser.parse_args()

Returns the number of unique characters

Function count_letter

Counts unique letters from given string. To speed up the work, the function has a cache, which, in case of repetition of input data, returns a ready value.

_word - input string _

Returns the number of unique characters

Function count_letter_in_file

Function read string from file

_file -input file objects _

Returns the result of function count_letter or None, when file is not valid \ No newline at end of file

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

unique_variable-1.1.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file unique_variable-1.1.tar.gz.

File metadata

  • Download URL: unique_variable-1.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.0

File hashes

Hashes for unique_variable-1.1.tar.gz
Algorithm Hash digest
SHA256 ee0e2172ce6515f16e554d14ece3aa2b648c835ab1527ffb339657e8d6bfce5b
MD5 18c64cf038d923a0aeac0d546c7f7514
BLAKE2b-256 6a44a15c74cbeebc71115b4a0951fe573883a18f1ce82adf53c9785689b3b1ef

See more details on using hashes here.

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