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.5.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.5.tar.gz.
File metadata
- Download URL: IsDigit-0.0.5.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 |
95dac7835c78ba814cb28f1612606b7456b4a8610359aef0812a26122cbb90d4
|
|
| MD5 |
cacd6455db69e6980acc1c013247b7d2
|
|
| BLAKE2b-256 |
edd616ffc96937bcdae3a350b0c2882ff74cc531862013ff881b8cdfd92b20c7
|
File details
Details for the file IsDigit-0.0.5-py2-none-any.whl.
File metadata
- Download URL: IsDigit-0.0.5-py2-none-any.whl
- Upload date:
- Size: 3.1 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 |
c6017e3ac197a6ef04f5d518b895e5626bab9a3136ea54221115704330fab9ae
|
|
| MD5 |
4f9a0add29a881700379362f21ffde18
|
|
| BLAKE2b-256 |
05da143185619593c901767c46a6711d7e5ac80b141e1961878a71b98debd854
|