U
U
usyginso2021-12-15 19:18:11
Python
usyginso, 2021-12-15 19:18:11

How to beautifully format the console output of a program?

Gradually I am writing a script in python (now 400 lines), somehow it performs the necessary functions, I run it through the console. But I ran into a problem, the larger the script, the more information is output to the console and the less readable it all becomes, I'm afraid that after a certain number of updates, the output to the console will turn into an unreadable mess. Already now it was necessary to cut down the deduced information. What possible solutions do you know how to write the output / program in the console in a beautiful and readable way? Unfortunately, I'm not good at this.

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alexbprofit, 2021-12-15
@usyginso

In addition to the answer above one can use colorama or rich

K
Kirill Palchevsky, 2021-12-15
@OffHand1424

As an option, the PrettyTable module

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question