摘要: 1. 读取文件 方法: all_the_text = open('thefile.txt').read() 但是为了安全起见还是给打开的文件对象指定一个名字,这样在完成之后可以迅速关掉,防止无用文件对象占用内存; 例子: file_object = open('thefile.txt',r) try 阅读全文
posted @ 2016-04-14 16:44 Aiapple 阅读(544) 评论(0) 推荐(0)