for d in os.listdir("dir"): full_path = os.path.join("dir", d) if os.path.isdir(full_path): shutil.rmtree(full_path) else: os.remove(full_path) ...
確定! 回上一頁