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)