From f8c1bdfd6a4a45a0fe3c495cb771abf16ffeb986 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 23 Nov 2019 22:06:14 +1100 Subject: [PATCH] csv2txt: improved formatting --- csv2txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csv2txt b/csv2txt index 99903ef..dfbf3a9 100755 --- a/csv2txt +++ b/csv2txt @@ -6,4 +6,4 @@ import sys rows = list(csv.reader(sys.stdin)) column_widths = list(max((len(str(cell))) for cell in column) for column in zip(*rows)) for row in rows: - print("".join(str(cell).ljust(width) for cell, width in zip(row, column_widths))) + print("".join(str(cell).ljust(width+1) for cell, width in zip(row, column_widths))) -- 2.39.2