next()函数
示例代码:
def getLabel(file):
res = []
with open(file, 'r') as f:
next(f)
for line in f:
l = line.split()
res.append(int(l[2]))
return res
更多推荐
python读取.txt文件跳过第一行
发布评论