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 |
+-----------+------+