Commit ea52c8f0 by BellCodeEditor

save project

parent 87f5112d
Showing with 12 additions and 5 deletions
import csv from csv import *
subjects=["姓名","语文","数学","英语"]
s1=["小明",89,91,97]
s2=["小王",85,93,92]
s3=["小张",90,92,97]
subject = ["姓名", "语文", "数学", "英语"] with open("scores.csv","w") as csvfile:
score1 = ["小贝", 98, 99, 92] _writer=writer(csvfile)
score2 = ["聪聪", 95, 91, 95] _writer.writerow(subjects)
\ No newline at end of file _writer.writerow(s1)
_writer.writerow(s2)
_writer.writerow(s3)
\ 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