From e9a017098a0f404268d9ed6764b9adc6cf3ce7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 2 Jul 2019 12:11:17 +0200 Subject: [PATCH] Table --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82fa4ff..9700f46 100644 --- a/README.md +++ b/README.md @@ -1905,7 +1905,7 @@ Table # $ pip3 install tabulate from tabulate import tabulate import csv -with open(, encoding='utf-8') as file: +with open(, encoding='utf-8', newline='') as file: lines = csv.reader(file, delimiter=';') headers = [header.title() for header in next(lines)] table = tabulate(lines, headers) diff --git a/index.html b/index.html index cd95086..3296c52 100644 --- a/index.html +++ b/index.html @@ -1613,7 +1613,7 @@ pyplot.show()
# $ pip3 install tabulate
 from tabulate import tabulate
 import csv
-with open(<filename>, encoding='utf-8') as file:
+with open(<filename>, encoding='utf-8', newline='') as file:
     lines   = csv.reader(file, delimiter=';')
     headers = [header.title() for header in next(lines)]
     table   = tabulate(lines, headers)