Skip to main content

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.

Release files for bisearch 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bisearch 0.1.2
File Size Uploaded
bisearch-0.1.2.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bisearch 0.1.2
File Interpreter ABI Platform
bisearch-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / bisearch-0.1.2.tar.gz

Download URL bisearch-0.1.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a0fe911192f83ba1c0533f8cc4a365f9ee4ec7a88801c8bf2d28a58fc021b755
BLAKE2b-256 checksum
How to use checksums
e42d8f747ce24a5c8e2286ce00de548c825aa75982f604a138c7746017333de1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / bisearch-0.1.2-py3-none-any.whl

Download URL bisearch-0.1.2-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
994eaec4a7101339f635db47e1ca19e38b50dc1578e805eec94deb78be1f0613
BLAKE2b-256 checksum
How to use checksums
494cafb17537dde0ec19a371a0c129e8a208e28ae18f3ee060eb965bd68d2f46
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page