python判断文件和文件夹是否存在、创建文件夹

    xiaoxiao2021-12-02  25

    >>> import os >>> os.path.exists('d:/assist') True >>> os.path.exists('d:/assist/getTeacherList.py') True >>> os.path.isfile('d:/assist') False >>> os.path.isfile('d:/assist/getTeacherList.py') True >>> os.makedirs('d:/assist/set') >>> os.path.exists('d:/assist/set') True
    转载请注明原文地址: https://ju.6miu.com/read-679828.html

    最新回复(0)