0 值的整型 / 浮点型、空字符串('')、空列表([])、 空元组((,))、空字典({})、空集合(set())都等价于 False,但是不等于 None

thing = None
if thing:
print("It's some thing")
else:
print("It's no thing") if thing is None:
print("It's no thing")
else:
print("It's some thing")

最新文章

  1. BPM公文管理解决方案分享
  2. Android测试关注点
  3. MFC之TreeCtrl控件使用经验总结
  4. 一种另类的解决URL中文乱码问题--对中文进行加密、解密处理
  5. easyUI 树的上下文菜单
  6. 组件局域网中的无集线器、Windows XP、Windows 7、Windows 8的对等网
  7. iOS AppIcon + launchImage+iPhone 屏幕分辨率相关知识
  8. 认识Ant
  9. springmvc国际化 基于请求的国际化配置
  10. this.$router.push、replace、go的区别
  11. linux命令之 tar
  12. C/S和B/S应用程序的区别
  13. 【原】 The Linux Command Line- pwd,cd,ls,file,less
  14. SkylineGlobe 邻近度(Proximity)分析JavaScript源代码
  15. asp.net中处理程序调用HttpContext.Current.Session获取值出错
  16. pstree命令详解
  17. PHPCMS V9 加密规则
  18. oracle通过sql随机取表中的10条记录
  19. SVN的学习
  20. h5移动端页面meta标签

热门文章

  1. css3技巧——产品列表之鼠标滑过效果(一)
  2. Building Plugins for iOS
  3. netbean使用技巧
  4. Mac OS X 快捷键(完整篇) 转载
  5. package.json 字段全解析 share
  6. 使用ajax()方法加载服务器数据
  7. 李洪强iOS开发之OC[014] -对象的存储细节
  8. lintcode:1-10题
  9. [mock]8月8日
  10. 41. First Missing Positive