首页 > 编程语言 > 详细

python第九期学习笔记(四)

时间:2019-10-16 12:02:06      阅读:82      评论:0      收藏:0      [点我收藏+]
#!/usr/bin/python3
#_*_ coding:utf-8 _*_
#author:inwell
#Time:2019/10/16 11:24

#同时打开多个文件
with open("t1.txt",mode="r",encoding="utf-8") as f1,open("t2.txt",mode="w",encoding="utf-8") as f2:
content=f1.read()
print(content)
f2.write("你是谁,我是谁")
f1.close()
f2.close()


python第九期学习笔记(四)

原文:https://www.cnblogs.com/gaoyuxia/p/11684614.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!