本文为CSDN博主"呆萌的代Ma"原创文章,转载请注明博客链接:https://blog.csdn.net/weixin_35757704/
本文链接:https://blog.csdn.net/weixin_35757704/article/details/120428971
import os
file = 'my_file/'
if not os.path.exists(file):
# 判断是否存在,不存在,则执行if下方的内容
os.mkdir(file) # 创建对应名称的文件夹