主要逻辑是判断文件的最后修改时间与创建时间是否在秒级别上一致,此代码适用于Python 2. import time import os #Read fime name\nFileName='D:/scapegoat/xx.csv' #print file creation time print time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(os.stat(FileName).st_ctime)) #print file modified time print time.strftime('%Y-%m-%d %H:%M:%S',time.l