在Python 中若要將資料寫入檔案,可使用 open 開啟檔案後,以 write 寫入資料,最後再以 close 關閉檔案。 # 以覆寫模式開啟檔案 f = open("output.txt", "w") ...
確定! 回上一頁