python if条件判断

判断目录是否存在,如果不存在就创建多级目录

import os
if not os.path.isdir('/ceshi/aa/cc'):
    os.makedirs('/ceshi/aa/cc')
原文地址:https://www.cnblogs.com/effortsing/p/9982054.html