Try   HackMD

影片大綱

  1. 檔案操作流程
    1.1 開啟檔案、操作檔案、關閉檔案
    1.2 開啟模式、檔案編碼 UTF-8
    1.3 最佳實務:使用 with as 語法
    1.4 檔案物件

  2. 讀取檔案
    2.1 一次讀取全部:read()
    2.2 逐行讀取資料:使用 for 迴圈

  3. 寫入檔案
    3.1 寫入字串到檔案中:write(字串)
    3.2 寫入換行符號:\n

  4. 讀取、儲存 JSON 格式的資料
    4.1 載入內建的 json 模組
    4.2 讀取資料:json.load(檔案物件)
    4.3 寫入資料:json.dump(資料, 檔案物件)

影片

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

筆記


END