Skip to content

Instantly share code, notes, and snippets.

@wynnzen
Created May 5, 2014 02:37
Show Gist options
  • Save wynnzen/651823a0779b64c13530 to your computer and use it in GitHub Desktop.
Save wynnzen/651823a0779b64c13530 to your computer and use it in GitHub Desktop.
判断文件是否存在,并删除
if os.path.exists("test.log"):
os.remove("test.log")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment