python3创建目录

感觉python3最好用的创建目录函数是os.makedirs,它可以设置在多级目录不存在时自动创建,已经存在也不抛出异常。

import os
os.makedirs('hello/hello1/hello2',exist_ok=True)
原文地址:https://www.cnblogs.com/itlqs/p/6418190.html