Skip to content

Commit 209ad8d

Browse files
committed
Updated readme example
1 parent f04d133 commit 209ad8d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,22 @@ print(output)
9595
from table2ascii import table2ascii, Styles
9696

9797
output = table2ascii(
98-
header=["#", "G", "H", "R", "S"],
99-
body=[["1", "30", "40", "35", "30"], ["2", "30", "40", "35", "30"]],
100-
footer=["SUM", "130", "140", "135", "130"],
101-
style=Styles.ascii_box,
98+
header=["First", "Second", "Third", "Fourth"],
99+
body=[["10", "30", "40", "35"], ["20", "10", "20", "5"]],
100+
column_widths=[10] * 4,
101+
style=Styles.ascii_box
102102
)
103103

104104
print(output)
105105

106106
"""
107-
+-----+-----+-----+-----+-----+
108-
| # | G | H | R | S |
109-
+-----+-----+-----+-----+-----+
110-
| 1 | 30 | 40 | 35 | 30 |
111-
+-----+-----+-----+-----+-----+
112-
| 2 | 30 | 40 | 35 | 30 |
113-
+-----+-----+-----+-----+-----+
114-
| SUM | 130 | 140 | 135 | 130 |
115-
+-----+-----+-----+-----+-----+
107+
+----------+----------+----------+----------+
108+
| First | Second | Third | Fourth |
109+
+----------+----------+----------+----------+
110+
| 10 | 30 | 40 | 35 |
111+
+----------+----------+----------+----------+
112+
| 20 | 10 | 20 | 5 |
113+
+----------+----------+----------+----------+
116114
"""
117115
```
118116

0 commit comments

Comments
 (0)