📅  最后修改于: 2022-03-11 14:45:21.546000             🧑  作者: Mango
import os
import shutil
path = 'path_to_my_folder'
if not os.path.exists(path):
os.makedirs(path)
else:
shutil.rmtree(path) # Removes all the subdirectories!
os.makedirs(path)