标签:blog bak pytho while write def color style copyfile
def read_bigFile(): f = open("123.dat",‘r‘) cont = f.read(10) while len(cont) >0 : print(cont) cont = f.read(10) 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)>0: #写入 fs2.write(cont1) cont1 = fs1.readline() fs1.close() fs2.close() copyFile()
标签:blog bak pytho while write def color style copyfile
原文地址:http://www.cnblogs.com/rocky-AGE-24/p/7638007.html