摘要: The Zen of Python, by Tim Peters Beautiful is better than ugly. 优美胜于丑陋。 Explicit is better than implicit. 明确胜于隐晦。 Simple is better than complex. 简单胜于复 阅读全文
posted @ 2020-06-01 22:14 码上的生活 阅读(2009) 评论(0) 推荐(0) 编辑
摘要: 在Python中,有两种类型表示字符数据序列:bytes和str. 字节的实例包含原始数据,无符号的8位值(通常以ASCII编码显示): >>> a = b'h\x65llo' >>> a b'hello' >>> print(list(a)) [104, 101, 108, 108, 111] > 阅读全文
posted @ 2020-06-01 22:11 码上的生活 阅读(381) 评论(0) 推荐(0) 编辑