import csv
#打开文件,用with打开可以不用去特意关闭file了,python3不支持file()打开文件,只能用open()
with open("info.csv","r") as csvfile:
     #读取csv文件,返回的是迭代类型
     read = csv.reader(csvfile)
     for i in read:
          print(i)

 

相关文章:

  • 2022-01-09
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2021-12-21
  • 2021-07-20
相关资源
相似解决方案