Python 移除檔案,目錄語法 admin 9 年前 import OS import shutil os.mkdir() #建立目錄 os.remove() #會移除檔案 os.redir() #會移除空白的目錄,目錄裡面不可以有檔案 shutil.rmtree() #會移除該目錄與其中的檔案