import os
if not os.path.exists(directory):
os.makedirs(directory)
【python】安全创建新路径 python create new directory if not exists
最新推荐文章于 2025-05-21 09:29:23 发布
import os
if not os.path.exists(directory):
os.makedirs(directory)