tmpName = '' if tmpName: print tmpName #没有输出 if tmpName is not None: print tmpName #有输出,是空行 转载于:https://www.cnblogs.com/artesian0526/p/9267906.html