os.path.join()函数:连接两个或更多的路径名组件
import os
lacation1 = './models'
lacation2 = 'e.txt'
Path = os.path.join(lacation1, lacation2)
print('Path = ', Path)
'''
执行结果如下:
Path = ./models\e.txt
'''
os.path.join()函数:连接两个或更多的路径名组件
import os
lacation1 = './models'
lacation2 = 'e.txt'
Path = os.path.join(lacation1, lacation2)
print('Path = ', Path)
'''
执行结果如下:
Path = ./models\e.txt
'''