Pad a string to the left with any number of characters
pip install left-pad
Then
>>> from left_pad import left_pad >>> s = "abc" >>> left_pad(s, 2, "+") '++abc'
Make sure to add left-pad to your dependencies in your next project.
Or, if you want to reinvent the wheel, go ahead and try to do it with the standard library
>>> s.rjust(len(s) + 2, '+') '++abc'
Metadata
Release files for left-pad 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| left-pad-0.0.3.tar.gz | 1.1 kB | Without provenance | Details for left-pad-0.0.3.tar.gz |
Release files / left-pad-0.0.3.tar.gz
| Download URL | left-pad-0.0.3.tar.gz |
|---|---|
| Size | 1.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b842b81fcf157ca09b1e0036c5876295fdfd097640aa85d37f988857eec64654
|
|
BLAKE2b-256 checksum How to use checksums |
a034cd668981dc6818d8a39f1185af8113268ddc71d99b0ba4aa8ceee2a123e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for left-pad 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.