python 判断一个文件夹是否存在,如果不存在,自动创建

代码

if not os.path.exists(path):
      os.makedirs(path)

猜你喜欢

转载自blog.csdn.net/xw2017/article/details/82668000