[Python] python检查指定的文件是否存在 →→→→→进入此内容的聊天室

来自 , 2019-02-25, 写在 Python, 查看 156 次.
URL http://www.code666.cn/view/44590aa9
  1. import os  
  2.  
  3. def file_exists(file_name):  
  4.     if os.path.exists(file):  
  5.         return '%s is found' % file_name  
  6.     else:  
  7.         return '%s is missing' % file_name

回复 "python检查指定的文件是否存在"

这儿你可以回复上面这条便签

captcha