首页
技术
登录
6mi
u
盘
搜
搜 索
技术
python——使用open读取txt
python——使用open读取txt
技术
2022-07-17
90
两种方式:
一
with
open
(
'***.txt'
)
as
f
:
f
.
readlines
(
)
**
**
二
for
line
in
open
(
'***.txt'
)
:
print
(
line
)
或 data
=
[
id_
for
id_
in
open
(
'***.txt'
)
]
转载请注明原文地址:https://ipadbbs.8miu.com/read-29063.html
最新回复
(
0
)