用Python讀取大文件(上)

一般咱們在讀取文件的時候,會用到read(), readline(), readlines()。 一般可能會有這樣的用法:html def test1(): with open("/tmp/test.log", "r") as f: print f.read() 或者 def test2(): f = open("/tmp/test.log", "r") f
相關文章
相關標籤/搜索