There is a library: I use tabulate ([1]) semi-regularly for this purpose. There are probably more.
I agree it would be very nice to have this in the standard library.
[1] https://pypi.org/project/tabulate/, https://github.com/astanin/python-tabulate
I agree it would be very nice to have this in the standard library.
[1] https://pypi.org/project/tabulate/, https://github.com/astanin/python-tabulate