python创建目录

 写的不好不要喷!谢谢

import os
def mkdir(create):
    create=create.strip()
    isExists=os.path.exists(create)

    if not  isExists:
        os.mkdir(create)
        return True
    else:
        print("目录已存在!",create)
        return False
print(mkdir("haha/heihei"))
原文地址:https://www.cnblogs.com/fuyuteng/p/12067170.html