专门做企业名录的网站,东莞关键词排名优化,东莞企业网站搭建制作,淄博做域名的公司import os#判断文件夹是否存在
dir os.path.exists(C:\\Users\\Desktop)
print(dir:, dir)#判断文件是否存在
file os.path.exists(C:\\Users\\Desktop\\雍正王朝.txt)
print(file:, file)运行结果 显示该文件及文件夹都存在import os#判断文件夹是否存在
dir os.path.exists(C:\\Users\\Desktop)
print(dir:, dir)#判断文件是否存在
file os.path.exists(C:\\Users\\Desktop\\雍正王朝.txt)
print(file:, file)运行结果 显示该文件及文件夹都存在