このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
最近の更新
$ pip3 search PrettyTable PrettyTable (7) - A simple Python library for easily displaying tabular data in a visually appealing ASCII table format.
from prettytable import PrettyTable def outputTable(): x = PrettyTable() x.field_names = {"a","b","c"} x.add_row({"1","2","3"}) print(x.get_string()) if __name__ == '__main__': outputTable()
+---+---+---+ | c | b | a | +---+---+---+ | 1 | 3 | 2 | +---+---+---+