PyPrnt helps you to print a list or a dictionary in an organized table form.
Just try it out!
Don't use print()
anymore. Use prnt()
for the rest of your life :)
# If you have both Python 2 and 3,
pip3 install pyprnt
# If you only have Python 3,
pip install pyprnt
from pyprnt import prnt
creation = ["Adam", "Eve"]
menu = {
"Kimchi": 5000,
"Ice Cream": 100
}
prnt(creation)
prnt(menu)
You should see this...
┌─┬────┐
│0│Adam│
│1│Eve │
└─┴────┘
┌─────────┬────┐
│Kimchi │5000│
│Ice Cream│100 │
└─────────┴────┘
Enable prnt() form.
prnt(creation, enable=False)
['Adam', 'Eve']
Print in both original print() form and prnt() form.
prnt(creation, both=True)
['Adam', 'Eve']
┌─┬────┐
│0│Adam│
│1│Eve │
└─┴────┘
Put a separator between each input.
prnt("010", "8282", "8282", sep="-")
010-8282-8282
Put at the end of an output.
prnt(creation, end="")
prnt("The force is with me")
┌─┬────┐
│0│Adam│
│1│Eve │
└─┴────┘The force is with me