Python 下使用檔案最直覺的寫法是這樣: f = open(filename) # do something f.close(). 或是這樣: # Python 2.6+ # 離開with 區塊時關閉檔案with ...
確定! 回上一頁