Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

listele-1.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

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

Hashes for listele-1.1.0.tar.gz
Algorithm Hash digest
SHA256 46ca9a4c223014ded6ae4b71b0cbc4ac8c70152e8ddc913bf944ba9136e97dc2
MD5 079739a864dc1344a100509a9d8d5fb6
BLAKE2b-256 46020d1ae52bba7f4156a449df219399cb1c599af5560036c657956d78bfdc2a

See more details on using hashes here.

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

Hashes for listele-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b6d49038bb9d5c3e8eacd0f38391453564b1cbe7cc85c7e30a0970157f892d
MD5 d365612686418a5e5a4c88cfcc148514
BLAKE2b-256 be77b9e7d476ac9a128a1fb229e82ea1d39859987e1394b660609c7c70eef12c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page