We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eea4832 commit 498d3dbCopy full SHA for 498d3db
python_csv/append_function.py
@@ -11,7 +11,7 @@ def get_length(file_path):
11
def append_data(file_path, name, email):
12
fieldnames = ['id', 'name', 'email']
13
next_id = get_length(file_path)
14
- with open('data.csv', 'a') as csvfile:
+ with open('data.csv', 'a', newline='') as csvfile:
15
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
16
writer.writeheader()
17
writer.writerow({
0 commit comments