python os.path.exists判断文件或文件夹是否存在

python os.path.exists判断文件或文件夹是否存在

如下图:

如果os.path.exists("/tmp/cifar10"),这样容易出错

最好写成os.path.exists("tmp/cifar10")

猜你喜欢

转载自blog.csdn.net/zyb418/article/details/88592745
今日推荐