python将文件1的内容-复制到文件2

#将文件1的内容-复制到文件2
with open("sunlin.txt","r")as f1:
with open("linda.txt","w")as f2:
content=f1.read()
f2.write(content)

 

posted @ 2024-02-19 16:48  琳达的博客  阅读(7)  评论(0编辑  收藏  举报