Python读写文件
来源:互联网 发布:通过照片搜淘宝app 编辑:程序博客网 时间:2024/06/11 04:57
#--coding:utf-8--#向指定文件中存储指定内容def text_create(name,msg): full_path = name+ '.txt' file = open(full_path,'w') file.write(msg) file.close() #从指定文件中读取文本内容def read_text(name): full_path = name + '.txt' file = open(full_path,'r') msg = file.read() print msg #测试text_create('hello','hello world')read_text('hello')
阅读全文
1 0
- python--python读写文件
- Python读写Unicode文件
- python Ini文件读写
- Python读写文件
- Python读写文件
- Python读写ini文件
- Python读写文件
- Python读写文件
- Python文件的读写
- python读写文件
- python文件读写
- [Python]读写文件方法
- python 文件读写操作
- Python文件读写操作
- Python读写文件
- python之读写文件
- python读写文件
- python文件的读写
- com.mysql.jdbc.connection和java.sql.connection的区别。
- 数字资产支付再添新成员
- react vr 原理解析
- FZU Problem 2197 最小花费 简单贪心>
- 第一次测试
- Python读写文件
- cJSON的简单使用
- ubuntu12.04安装Qt5.6
- 栈的顺序存储和链式存储
- 8.3 回顾总结
- 7月24
- POJ3660 Cow Contest(floyd)
- 20170809
- 最初问题