1.os.path.exists()
既可以判断文件是否存在,又可以判断文件夹是否存在

2.os.path.isfile()
判断文件是否存在

3.os.path.isdir()
判断文件夹是否存在

 

相关文章:

  • 2022-12-23
  • 2021-09-11
  • 2021-11-12
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
猜你喜欢
  • 2021-09-29
  • 2021-10-29
  • 2021-06-11
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案