最近着手处理一个文件拷贝的问题处理,用到os.path.basename(),返回path最后的文件名。若path以/或\结尾,那么就会返回空值。eg:path='D:\优快云'os.path.basename(path)=优快云