命令如下:
f = open("c:\\1.txt","r")
lines = f.readlines()#读取全部内容
for line in lines
print line
实例 如下:
f = open("D:\\Python project\\Part 1\\script\\user.txt","r")
lines=f.readlines()
for line in lines:
print (line)
2024-02-09 21:53:40
命令如下:
f = open("c:\\1.txt","r")
lines = f.readlines()#读取全部内容
for line in lines
print line
实例 如下:
f = open("D:\\Python project\\Part 1\\script\\user.txt","r")
lines=f.readlines()
for line in lines:
print (line)
下一篇:Adroid解析json