No project description provided
Project description
GAK allows for easy and customizable conversion of numbers to different bases. Here’s a crash course in usage:
from gak import base # prints "F" print(base(15, 16))
base() takes two arguments: the number being converted, and what base to convert the number to. An optional third argument is a custom lookup table for the base conversion that looks as follows:
#prints "bab" print(base(5, 2, {0: "a", 1: "b"}))
It is a dictionary where the key is the number to be converted and the value is what string the number should become. By default GAK provides a lookup table up to base16.
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
gak-1.0.tar.gz
(1.3 kB
view details)
File details
Details for the file gak-1.0.tar.gz
.
File metadata
- Download URL: gak-1.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c47a062fda416577b5751ea62ddd95283a5917ffc2c30ad2ae1dbbed1328004f |
|
MD5 | 39ae079a0333a4d78a91a4cc1f139df6 |
|
BLAKE2b-256 | cae47e1f64661e17a21b441a62bc475b3bbc9877479913ea8c7eb6664ea754cc |