def read_bigFile():
f = open("123.dat",'r')
cont = f.read()
while len(cont) > :
print(cont)
cont = f.read()
  f.close()
read_bigFile()
def copyFile():
f1 = "123.dat"
f2 = "123.dat.bak"
#大文件复制
fs1 = open(f1,'r')
fs2 = open(f2,'w')
cont1 = fs1.readline() while len(cont1)>:
#写入
fs2.write(cont1)
cont1 = fs1.readline()
fs1.close()
fs2.close()
copyFile()
04-29 02:40