2017年7月13日

python代码`if not x:` 和`if x is not None:`和`if not x is None:`使用

摘要: 内容转自 http://blog.csdn.net/sasoritattoo/article/details/12451359 代码中经常会有变量是否为None的判断,有三种主要的写法: 第一种是`if x is None`; 第二种是 `if not x:`; 第三种是`if not x is N 阅读全文

posted @ 2017-07-13 20:15 想去浙大的读研wzp 阅读(286) 评论(0) 推荐(0) 编辑

导航