Python對文檔的處理

一.文件的打開和建立 >>> f = open('/tmp/test.txt') >>> f.read() 'hello python!\nhello world!\n' >>> f <open file '/tmp/test.txt', mode 'r' at 0x7fb2255efc00> 二.文件的讀取 步驟:打開 – 讀取 – 關閉node >>> f = open('/tmp/test.
相關文章
相關標籤/搜索