Commit e3c2d50f by BellCodeEditor

save project

parent 547fde3f
Showing with 4 additions and 8 deletions
...@@ -3,9 +3,8 @@ subject = ["姓名", "语文", "数学", "英语"] ...@@ -3,9 +3,8 @@ subject = ["姓名", "语文", "数学", "英语"]
score1 = [["小贝"],[ 98, 99, 92]] score1 = [["小贝"],[ 98, 99, 92]]
score2 = [["聪聪"], [95, 91, 95]] score2 = [["聪聪"], [95, 91, 95]]
with open ("s.csv","w",encoding="utf-8")as file: with open ("s.csv","w",encoding="utf-8",newline="")as file:
f=csv.writer(file) f=csv.reader(file)
print(data[0][0])
f.writerows(score1)
姓名,语文,数学,英语
小贝,98,99,92
聪聪,95,91,95
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