os.listdir(folder) 會以串列的形式,列出資料夾中所有的內容。 import os ... 下方的例子,效果等同於直接在終端機使用指令,建立資料夾、列出目錄、開啟檔案與刪除檔案。
確定! 回上一頁