Python基础知识 2017-04-25 本文已影响0人 BillLeee 一、判断文件是否存在 import os ex = os.path.exists('1.txt') print(ex) #output True(Flase)