#二进制文件读写
f1=open(r"C:/Users/Admin/Desktop/aaa.python/111.jpg","rb")
data=f1.read()
f1.close()
f2=open(r"C:/Users/Admin/Desktop/aaa.python/112.jpg","wb")
f2.write(data)
f2.close()
with open(r"C:/Users/Admin/Desktop/aaa.python/111.jpg","rb") as f1,open(r"C:/Users/Admin/Desktop/aaa.python/112.jpg","wb") as f2:
data=f1.read()
f2.write(data)
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/245256.html