Pip install prettytable
from prettytable import PrettyTable
# Sample data
data = [['Alice', 25, 'New York'],
['Bob', 30, 'Los Angeles'],
['Charlie', 35, 'Chicago']]
# Creating a PrettyTable object
table = PrettyTable(['Name', 'Age', 'City'])
# Adding data to the table
for row in data:
table.add_row(row)
# Printing the table
print(table)