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