Commit e28c95cc by BellCodeEditor

save project

parent 458aebed
Showing with 10 additions and 2 deletions
"""读取csv文件""""
"""读取csv文件"""
import csv
data = [["姓名", "语文", "数学", "英语"],
["小贝", 98, 99, 92],
["聪聪", 95, 91, 95]]
with open("report.csv","r",encoding="utf-8")as f:
f_csv=csv.reader(f)
f_csv=list(f)
print(f_csv[7])
print(f_csv[1][4],f_csv[2][4],f_csv[3][4],f_csv[4][4],f_csv[5][4],f_csv[6][4],f_csv[7][4])
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