12345678910111213141516171819 |
- #coding=utf-8
- '''
- Created on 2017年8月29日
- @vsersion:python 3.6
- @author: liuyuqi
- '''
- def readTxt(filePath):
- f=open(filePath)
- text=f.read()
- f.close()
- return text
- def writeTxt():
- f=open('../data/data.txt', 'w')
- f.write('hello========hello======\n he llo\n')
- f.close()#一定要记得close,否则其他软件打开为只读
|