#Python - Open and read file
2016-04-23 本文已影响0人
10b0bb7d9704
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