摘要: or用在赋值表达式的时候,不是返回bool值,而是按以下的情况赋值 如果左侧的表达式估值为True,则返回左侧表达式 否则返回右侧表达式 例子: 上面的例子没有什么意义,仅用于测试。 阅读全文
posted @ 2019-01-27 13:23 WaltHwang 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 1、Python3字符序列的类型 bytes -> 原始的8位值(既字节) str -> Unicode字符 2、Python2字符序列的类型 str -> 原始的8位值(既字节) unicode -> Unicode字符 即Python3的bytes对应Python2的str,而Python3的s 阅读全文
posted @ 2019-01-27 12:59 WaltHwang 阅读(522) 评论(0) 推荐(0) 编辑
摘要: Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better tha 阅读全文
posted @ 2019-01-27 00:00 WaltHwang 阅读(457) 评论(0) 推荐(0) 编辑