首页
科技
登录
6mi
u
盘
搜
搜 索
科技
python读取.txt文件跳过第一行
python读取.txt文件跳过第一行
科技
2026-01-26
11
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
转载请注明原文地址:https://blackberry.8miu.com/read-43870.html
最新回复
(
0
)