/wideprint

python package to help print a collection of short strings in columns

Primary LanguagePythonMIT LicenseMIT

Wideprint

.github/workflows/publish_to_pypi.yml PyPI - Version PyPI - Python Version

Installation

pip install wideprint

Usage

def print_columns(data:Iterable, columns:int=3, sep:str=" ", alignment:Literal[">","<","^"]=">")

from wideprint import print_columns

print_columns(
   data      = ["aaaa","b","c","d","e","f","g","h","i","j","kkk","l","m","n","o"],
   columns   = 3,
   sep       = "  ",
   alignment = "<"
)
aaaa  b    c
d     e    f
g     h    i
j     kkk  l
m     n    o

License

wideprint is distributed under the terms of the MIT license.