os.path.join里写3个变量

发布时间:2019-09-02 07:39:57编辑:auto阅读(1872)

    os.path.join里写3个变量

    注:

    必须为变量,不是变量需先定义为变量

    dst="/home/ming"

    Images = "Images"

    d = open('/log/aa.txt','r')
    for e in d.readlines():
    d.close()
    if not os.path.exists(os.path.join(dst,e.strip(),Images)):
    os.makedirs(os.path.join(dst,e.strip(),Images))

关键字