Simple, mainly useless python package that checks if a string, int, or float is a digit.
Project description
Installing
From source:
pip install git+https://github.com/editid0/IsDigit
From pypi:
pip install -U IsDigit
Examples
import IsDigit as id
digits = id.IsDigit(allow_floats=True, allow_ints=True)
print(digits.is_digit('1')) # returns True
print(digits.is_digit('1.0')) # returns True
print(digits.is_digit('1.0.0')) # returns False
print(digits.is_digit('x')) # returns False
Or, alternatively:
import IsDigit as id
digits = id.IsDigit()
print(digits.is_digit('1')) # returns True
print(digits.is_digit('1.0')) # returns False
print(digits.is_digit('1.0.0')) # returns False
print(digits.is_digit('x')) # returns False
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
IsDigit-0.0.4.tar.gz
(1.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file IsDigit-0.0.4.tar.gz.
File metadata
- Download URL: IsDigit-0.0.4.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94ff8546d5f8182467e337a406f16ff394571b826afa690709d16cb30332f1a9
|
|
| MD5 |
b3d2ce696b19a3eccee879eec34bc73c
|
|
| BLAKE2b-256 |
92b71e4d6572b7efcaa17ccf02ba4f5947aa4ce0f125d4efdaf0412de3039736
|
File details
Details for the file IsDigit-0.0.4-py2-none-any.whl.
File metadata
- Download URL: IsDigit-0.0.4-py2-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf3f9554fedabe0a8808b2bc7300b00bb4aa8acee4da65b9ecc01332732e27c
|
|
| MD5 |
b7b0c1139b7f2a4553e34e994f61d705
|
|
| BLAKE2b-256 |
58691f00e3862253a4fe089bd872b3634ac021716d3792a44913d4ce0796f270
|