Python判断文件是否存在 os 基础用法
super
2022-12-15 00:03

Python判断文件是否存在 os 基础用法
import os
exist = os.path.exists('py017.jpeg')
print(exist)
# True
exist = os.path.exists('py666.jpeg')
print(exist)
# False

0 条讨论