willsonlincake 发表于 2022-4-11 21:42:47

Python删除文件,清理垃圾

请谨慎操作
import os
if os.path.exists("demofile.txt"):
os.remove("demofile.txt")
else:
print("The file does not exist")
页: [1]
查看完整版本: Python删除文件,清理垃圾