Commit 2894ca8d by BellCodeEditor

save project

parent 2ab3619c
Showing with 10 additions and 2 deletions
"""读取csv文件""""
\ No newline at end of file
import csv
# data = [["姓名", "语文", "数学", "英语"],
# ["小贝", 98, 99, 92],
# ["聪聪", 95, 91, 95]]
with open("report.csv","r",encoding="utf-8") as a:
f_csv=csv.reader(a)
data=list(f_csv)
for i in range(10):
print(data[0][i]+":"+data[7][i])
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