list-fmt
Format iterables into human readable text.
Installation
pip install list-fmt
Basic Usage
>>> from listfmt import join_with
>>> L = ["one", "two", "three"]
>>> join_with(L, join_last = " and ")
'one, two and three'
>>>
>>> from listfmt import strjoin
>>> strjoin(", ", [1, 2, 3])
'1, 2, 3'
>>>
>>> from list import ordered_list
>>> print(ordered_list(["one", "two", "three"], style = "A"))
A. one
B. two
C. three
>>>
>>> from listfmt import unordered_list
>>> print(unordered_list(["one", "two", ["a", "b"], "three"], recursive = True))
* one
* two
* a
* b
* three
>>>
Links
Metadata
Release files for list-fmt 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| list-fmt-0.0.1.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| list_fmt-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / list-fmt-0.0.1.tar.gz
| Download URL | list-fmt-0.0.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c571bc94393c303f4e520ad1539304b834d082865d7de5534d9e122bc5ee7a01
|
|
BLAKE2b-256 checksum How to use checksums |
369f34840595e2e44a7dcba705d56fafac2d2532d5d6a1ea25a2e4ef085e6532
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / list_fmt-0.0.1-py3-none-any.whl
| Download URL | list_fmt-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d36d4ff350a1be03f4a214ccd14160d862f20cf45e68930646b4b388e52887b
|
|
BLAKE2b-256 checksum How to use checksums |
86359295c63bf677455d3860d21f66e096a7d58d2f18d637a97b52836219d221
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|