Commit e30d03cd by BellCodeEditor

save project

parent 81a4fa1b
Showing with 8 additions and 2 deletions
...@@ -5,4 +5,10 @@ data = [["姓名", "语文", "数学", "英语"], ...@@ -5,4 +5,10 @@ data = [["姓名", "语文", "数学", "英语"],
with open("c.csv","w",encoding="utf-8",newline="") as csvfile: with open("c.csv","w",encoding="utf-8",newline="") as csvfile:
writer=csv.writer(csvfile) writer=csv.writer(csvfile)
writer.writerows(data) writer.writerows(data)
with open("c.csv","r",encoding="utf-8") as f:
\ No newline at end of file f_csv=csv.reader(f)
f_csv=list(f_csv)
pipi=f_csv[2]
print(pipi)
for row in f_csv:
print(row[3])
\ 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