import os
import shutil

os.remove(path)   #删除文件
os.removedirs(path)   #删除空文件夹

shutil.rmtree(path)    #递归删除文件夹

 

相关文章:

  • 2022-01-03
  • 2021-10-14
  • 2022-02-07
  • 2021-12-15
  • 2022-01-23
  • 2021-10-18
  • 2021-05-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2022-02-06
  • 2022-01-03
  • 2022-12-23
相关资源
相似解决方案