资 源 简 介
PrettyTable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables, like this:
+-----------+------+------------+-----------------+| City name | Area | Population | Annual Rainfall |+-----------+------+------------+-----------------+| Adelaide | 1295 | 1158259 | 600.5 || Brisbane | 5905 | 1857594 | 1146.4 || Darwin | 112 | 120900 | 1714.7 || Hobart | 1357 | 205556 | 619.5 || Melbourne | 1566 | 3806092 | 646.9 || Perth | 5386 | 1554769 | 869.4 || Sydney | 2058 | 4336374 | 1214.8 |+-----------+------+------------+-----------------+
PrettyTable lets you control many aspects of the table, like the width of the column padding, the alignment of text within columns, which characters are used to draw the table border, whether you even want a border, and much more. You can control wh