StupidBeauty
Read times:514Posted at:Fri Nov 23 22:05:04 2012
- no title specified

转载 如何判断文件或目录是否存在(python)

要判断一个文件是否存在,可使用os.path.isfile()。

http://www.360doc.com/content/11/0416/18/2660674_110110352.shtml

亮点:

import os
os.path.isfile('a.txt') #如果不存在就返回False

Your opinions
Your name:Email:Website url:Opinion content:
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4