Commit e3cc51a5 by BellCodeEditor

save project

parent 3006b604
Showing with 7 additions and 4 deletions
...@@ -4,6 +4,9 @@ data = [["姓名", "语文", "数学", "英语"], ...@@ -4,6 +4,9 @@ data = [["姓名", "语文", "数学", "英语"],
["小贝", 98, 99, 92], ["小贝", 98, 99, 92],
["聪聪", 95, 91, 95]] ["聪聪", 95, 91, 95]]
with open("sores.csv","w",encoding="utf-8",newline="") as csvfile: with open("sores.csv","w",encoding="utf-8",newline="") as f:
writer = csv.writer(csvfile) writer = csv.writer(f)
writer.writerows(data) writer.writerows(data)
\ No newline at end of file f_csv=csv.reader(f)
print(f_csv)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment