Just a printing listed version function.
Project description
listele function
Prints the given iterable in a listed format with columns and spacing.
listele(li:list|dict, column:int, /, *, spaces:int=30, find:str="", reverse:bool=False)
"""
- li : An iterable
- column : Output column number
- spaces : Spaces between elements
- find : Filters the output with given string
- regex : Filters the output with given regex
- reverse : Prints elements top to bottom instead of left to right
"""
# Usage example:
from listele import listele
import sysconfig
li = dir(sysconfig) # list type object
di = sysconfig.get_paths() # dict type object
print("Output1:")
listele(li, 4)
print("\n\nOutput2:")
listele(li, 4, find="path")
print("\n\nOutput3:")
listele(di, 2, spaces=70)
print("\n\nOutput4:")
listele(di, 1, find="include")
print("\n\nOutput5:")
listele([1, 2, 3, 4, 5], 3, reverse=True)
print("\n\nOutput6:")
listele(['Hello', 'hello', 'hello world'], 2, regex="^[Hh]ello$")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
listele-1.1.0.tar.gz
(3.2 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 listele-1.1.0.tar.gz.
File metadata
- Download URL: listele-1.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46ca9a4c223014ded6ae4b71b0cbc4ac8c70152e8ddc913bf944ba9136e97dc2
|
|
| MD5 |
079739a864dc1344a100509a9d8d5fb6
|
|
| BLAKE2b-256 |
46020d1ae52bba7f4156a449df219399cb1c599af5560036c657956d78bfdc2a
|
File details
Details for the file listele-1.1.0-py3-none-any.whl.
File metadata
- Download URL: listele-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3b6d49038bb9d5c3e8eacd0f38391453564b1cbe7cc85c7e30a0970157f892d
|
|
| MD5 |
d365612686418a5e5a4c88cfcc148514
|
|
| BLAKE2b-256 |
be77b9e7d476ac9a128a1fb229e82ea1d39859987e1394b660609c7c70eef12c
|