#这是要拷贝的文件
a = open('', "r")
#这是需要拷贝的地方
b = open('', "a")
while True:
count = a.read(1024)
if count == 0:
break
b.write(count)
a.close()
b.close()
python 实现一个文件的拷贝功能,注意:大文件的问题
最新推荐文章于 2023-02-03 18:30:29 发布
#这是要拷贝的文件
a = open('', "r")
#这是需要拷贝的地方
b = open('', "a")
while True:
count = a.read(1024)
if count == 0:
break
b.write(count)
a.close()
b.close()