不想用 try 语句,如何判断一个文件是否存在?
try
答案是:
import os.path os.path.isfile(file_name)
Last updated 5 years ago
Was this helpful?