转发 python中file和open有什么区别
摘要:python中file和open有什么区别?2008-04-15 11:30地痞小流氓 | 分类:python | 浏览3426次python中file和open有什么区别?都是打开文件,说的越详细越好,最好能有例子。分享到:2008-04-15 11:42 提问者采纳file是一个类,而用open函数打开后是返回一个file对象。file1 = file("aa.txt")file2 = open("aa.txt")#这个时候返回的是跟file1一样的对象,都可以对aa.txt进行读取,修改。暂时发现貌似没多大区别,习惯上喜欢用open。frm:htt
阅读全文
posted @
2014-02-20 13:49
苍茫子雪
阅读(1460)
推荐(0)