python创建文件夹

前端之家收集整理的这篇文章主要介绍了python创建文件夹前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

import os

filePath = 'D:\12345'

# 判断文件夹是否存在,不存在则创建文件
if not os.path.exists(filePath):
  os.makedirs(filePath)

猜你在找的Python相关文章