f.close(). 以唯讀方式開啟test.txt,. 暫存檔名稱為f. For迴圈會自檔案f中一次讀. 入一行放入line變數,然後. 用print()印出來. 程式結束要關閉檔案.
確定! 回上一頁