我們可以利用json模組(Module)中的dumps()方法將資料格式化為JSON,接著再透過Path 物件的write_text()方法寫入檔案中,如下範例:. import json; from pathlib ...
確定! 回上一頁