首页 > 技术文章 > Python新建文件夹(如果不存在)

yaos 2019-12-30 23:44 原文

import os
if not os.path.exists(directory):
    os.mkdir(directory)

推荐阅读