python if条件判断 判断目录是否存在,如果不存在就创建多级目录 import os if not os.path.isdir('/ceshi/aa/cc'): os.makedirs('/ceshi/aa/cc')