gpt4 book ai didi

python - 从python中的文件中逐行读取

转载 作者:太空宇宙 更新时间:2023-11-04 09:56:13 24 4
gpt4 key购买 nike

<分区>

为了从此文件中提取一些值:

enter image description here

我需要逐行阅读。我试着先逐行阅读,但我不知道为什么它不起作用。

我试过这个:

#! /usr/bin/python
file = open('/home/results/err.txt')
for line in file.readline():
print line

编辑:

问题:工作但不显示这些行(这是文件) enter image description here

最后一行是:(这是生成的) enter image description here

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com