Python ile terminal üzerinde tablo gösterme

python, table, tabulate

7604036.png
pip install tabulate

Here's a basic example of how to use the tabulate package:

from tabulate import tabulate

data = [
    ["Alice", 30, "New York"],
    ["Bob", 25, "San Francisco"],
    ["Charlie", 22, "Los Angeles"],
]

headers = ["Name", "Age", "City"]

print(tabulate(data, headers=headers, tablefmt="grid"))

This will output:

Last updated

Was this helpful?