fn1 = 'E:/test/a1.txt'
fn2 = 'E:/test/a2.txt'
with open(fn1,'w') as f:
f.writelines('\n'.join(['abc','123','xyz']))
with open(fn1,'rb') as f1:
with open(fn2,'wb') as f2:
length = 16*1024
while True:
buf = f1.read(length)
if not buf:
break
f2.write(buf)
文件拷贝
最新推荐文章于 2024-08-19 17:55:19 发布