python Pretty Table

Calvin Park·2022년 5월 18일
0

install pretty table from https://pypi.org/project/prettytable/

from prettytable import PrettyTable

table = PrettyTable();
table.field_names=["City name", "Area"]
table.add_row(["Sydney", "NSW"])
table.add_row(["Melbourne", "VIC"])

result :
+-----------+------+
| City name | Area |
+-----------+------+
| Sydney | NSW |
| Melbourne | VIC |
+-----------+------+

profile
Personal Velog Note

0개의 댓글