python覆盖写入,追加写入

追加写入:spa   # -*- coding:utf-8 -*-utf-8 # a 指定打开文件的模式,a为追加   r为只读it a=open('test.txt', 'a')test a.write('追加写入')coding a.close()di   f=open('test.txt', 'r')文件 print f.read()co   覆盖写入:   a=open('test.txt
相关文章
相关标签/搜索