https://github.com/kanghyojun/pyleftpad
Python version left pad
https://github.com/kanghyojun/pyleftpad
leftpad library python utility
Last synced: about 1 year ago
JSON representation
Python version left pad
- Host: GitHub
- URL: https://github.com/kanghyojun/pyleftpad
- Owner: kanghyojun
- License: gpl-3.0
- Created: 2018-08-13T14:36:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T17:09:40.000Z (almost 8 years ago)
- Last Synced: 2025-02-09T10:29:22.466Z (over 1 year ago)
- Topics: leftpad, library, python, utility
- Language: Python
- Size: 28.3 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
pyleftpad
=========
[](https://badge.fury.io/py/pyleftpad)
[](https://travis-ci.org/admire93/pyleftpad)
[](https://pyleftpad.readthedocs.io/en/latest/?badge=latest)
Python version of [left pad][leftpad].
[leftpad]: https://www.npmjs.com/package/left-pad
## Install
```bash
$ pip install pyleftpad
```
## Usage
There are two way to use pyleftpad. First of all, you can use `leftpad()`
function from `leftpad` module in your Python script.
```python
from leftpad import leftpad
def main():
print(leftpad('hello world', 40))
main()
```
Second of all, you can use directly `leftpad` command in your shell.
```bash
$ leftpad -l 40 "hello world"
```