简单的文件操作的例子

来源:互联网 发布:网络贷款有多少人不还 编辑:程序博客网 时间:2024/05/29 18:37


#!Filename:12.1.pytemp="adfasfddasf";f=file('poem.txt','a');f.write(temp);f.close();f=file('poem.txt');while True:line=f.readline();if len(line)==0:break;print line;f.close();


不适用模块。。

单引号使用。。

文件每行的读入处理。。

中文注释不支持。。怎么破。。。。

参考:

http://maincoolbo.iteye.com/blog/626655



0 0