Skip to main content

No project description provided

Project description

Binary Search

This module allows the function of binary searching in strings, lists or tuples

 

 

Installation

Run the following to install:

pip install bisearch

 

Usage

import bisearch 

# Check if target exists within search range
bisearch.exist(target,field)

# Check where target is located within search range
bisearch.location(target,field)

 

Types of target inputs

Target input refers to the first input argument when the function is called

 

Int - accepts int value --- Note - int inputs are not compatible with string fields

Float - accepts float value --- Note - float inputs are not compatible with string fields

Single character string - accepts single character string --- Note - single character string inputs are only compatible with one word strings

Word string - accepts string of single word --- Note - word strings are only compatible with multiple word strings

 

 

Types of field inputs

Field input refers to the second argument when the function is called

 

2D Array - accepts any length 2D array

Tuple - accepts any length tuple --- Note - tuples are converted into lists

One Word Strings - accepts strings without any spaces --- Note - string is split into list of characters

Multiple Word Strings - accepts strings that are seperated by one white space --- Note - string is split into list of words

 

 

Notes

when using location if the target does not exist within the field the function will return None.

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

bisearch-0.1.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

bisearch-0.1.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file bisearch-0.1.2.tar.gz.

File metadata

  • Download URL: bisearch-0.1.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for bisearch-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a0fe911192f83ba1c0533f8cc4a365f9ee4ec7a88801c8bf2d28a58fc021b755
MD5 d563fe57cba8c37c8c5d9a789abaa259
BLAKE2b-256 e42d8f747ce24a5c8e2286ce00de548c825aa75982f604a138c7746017333de1

See more details on using hashes here.

File details

Details for the file bisearch-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: bisearch-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for bisearch-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 994eaec4a7101339f635db47e1ca19e38b50dc1578e805eec94deb78be1f0613
MD5 73a619b9efcb8970305d83badbecf2e5
BLAKE2b-256 494cafb17537dde0ec19a371a0c129e8a208e28ae18f3ee060eb965bd68d2f46

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