Commit e0dbb70f by BellCodeEditor

auto save

parent 87f5112d
Showing with 15 additions and 5 deletions
数学,98,99
语文,332,43
科学,54,6,8
1,2,1,3
import csv import csv
data=[
subject = ["姓名", "语文", "数学", "英语"] ['数学',98,99],
score1 = ["小贝", 98, 99, 92] ['语文',332,43],
score2 = ["聪聪", 95, 91, 95] ['科学',54,6,8],
\ No newline at end of file [1,2,1,3]
]
with open('a.csv','w',encoding='utf-8',newline='\n') as f:
writer=csv.writer(f)
for i in data:
writer.writerow(i)
\ 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