摘要: python判断值是否为空(None) 代码中经常会有变量是否为None的判断,有三种主要的写法: 第一种: if x is None: pass 第二种: if not x: pass 第三种 if not x is None: pass 这句这样理解更清晰 if not (x is None): 阅读全文
posted @ 2022-09-01 16:07 余生以学 阅读(15687) 评论(1) 推荐(0) 编辑