Commit 45850279 by BellCodeEditor

auto save

parent dfd7ec45
Showing with 6 additions and 5 deletions
......@@ -4,8 +4,10 @@ subject = ["姓名", "语文", "数学", "英语"]
score1 = ["小贝", 98, 99, 92]
score2 = ["聪聪", 95, 91, 95]
data = [subject, score2, score2]
with open("123.csv", "w", encoding="utf-8") as file1:
w = csv.writer(file1)
w.writerow(subject)
w.writerow(score1)
w.writerow(score2)
with open("t1.csv", "w", encoding="utf-8", newline="") as f1:
x = csv.writer(f1)
x.writerows(data)
\ 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