空列表不等同于None

ss = []
if ss is not None:
    print("None1")
ss = None
if ss is not None:
    print("None2")
输出结果:
None1
发布了447 篇原创文章 · 获赞 153 · 访问量 49万+

猜你喜欢

转载自blog.csdn.net/ningyanggege/article/details/105255273
今日推荐