From 32e32bfff6da47b467fb0549d418f1b9060b34a5 Mon Sep 17 00:00:00 2001 From: x p k Date: Fri, 13 May 2022 13:56:09 +0800 Subject: [PATCH] NEW: terminaltable demo --- py/termtable.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 py/termtable.py diff --git a/py/termtable.py b/py/termtable.py new file mode 100644 index 0000000..29df489 --- /dev/null +++ b/py/termtable.py @@ -0,0 +1,10 @@ +from terminaltables import SingleTable + +table_data = [ + ['Heading1', 'Heading2'], + ['row1 column1', 'row1 column2'], + ['row2 column1', 'row2 column2'], + ['row3 column1', 'row3 column2'] +] +t1 = SingleTable(table_data) +print (t1.table)