如何使用python从csv文件中获取每3行?
import csv
with open ('data.csv','r') as infile:
contents = csv.reader(infile, delimiter =' ')
then???
csv 文件如下所示:
aaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbb
only recquired line
cccccccccccccccccccccccccc
ddddddddddddddddddddddddd
only recquired line
结果应如下所示:
only recquired line
only recquired line