open
f = open(path)
read
-
f.read()
using once to read entire file -
f.readlines()
use once to read one line -
for line in f
loop over the file, most useful
f = open(path)
f.read()
using once to read entire filef.readlines()
use once to read one linefor line in f
loop over the file, most useful本文标题:#Python - Open and read file
本文链接:https://www.haomeiwen.com/subject/hgbxrttx.html
网友评论