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
- reverse : Prints elements top to bottom instead of left to right (disabled by default)
"""
# 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)

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.0.0.tar.gz (3.0 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.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file listele-1.0.0.tar.gz.

File metadata

  • Download URL: listele-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for listele-1.0.0.tar.gz
Algorithm Hash digest
SHA256 17b13542ffb84544dfa13a56a2a68cb18c77e383395776997718acc9dc3f7b9e
MD5 8d9856bc74f2810e3f983c4b71d28d93
BLAKE2b-256 5ff54d9f136ca679717365bf4a5dc6df65c295cfa293fbc1f45d1b7109710e97

See more details on using hashes here.

File details

Details for the file listele-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: listele-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for listele-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 643c93d21923208a44dce09ad2cde54734803a74c14b17af69c33f49b4d13de3
MD5 bbd18a8f2c610c29d0f9c63961e81fa1
BLAKE2b-256 7426def0cef80aacdeda31b6e112b515f3edab226fbbd1a4a7d3ec4bfdba9351

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