2014年7月21日

[Python]打开文件的模式

摘要: Python中以sys.open()方法打开文件1 import sys2 3 file = open("D:\\file.txt")其中可在第二个参数的位置指定打开文件的模式1 import sys2 3 file = open("D:\\file.txt", "r")参数共有以下几种:rU或Ua... 阅读全文

posted @ 2014-07-21 15:07 shelven 阅读(710) 评论(0) 推荐(0) 编辑

导航