Commit 14140692 by BellCodeEditor

save project

parent 828ed1b1
Showing with 6 additions and 5 deletions
import csv from csv import *
data=[["姓名","语文","数学","英语"],["小明",89,91,97],["小王",85,93,92]]
data = [["姓名", "语文", "数学", "英语"], with open("scores.csv","w",newline='') as csvfile:
["小贝", 98, 99, 92], _writer=writer(csvfile)
["聪聪", 95, 91, 95]] _writer.writerows(data)
\ No newline at end of file \ 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