tmpName = ''
if tmpName:
print tmpName
#没有输出
if tmpName is not None:
print tmpName
#有输出,是空行
python 直接if判断和is not None的区别
最新推荐文章于 2024-03-18 18:20:13 发布
tmpName = ''
if tmpName:
print tmpName
#没有输出
if tmpName is not None:
print tmpName
#有输出,是空行