2018年8月4日
摘要: 1、python2.x源码不规范,重复性较多,不支持中文,默认编码为ASCII,可以在文件=头部加入 # -*- encoding:utf-8 -*-来解决 2、python3.x源码清晰,简洁,优美,支持中文,默认编码为utf-8 阅读全文
posted @ 2018-08-04 10:38 旧巷子里的猫 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 一、 print(1 > 2 or 3 and 4 < 6) print(2 or 3 and 4 < 6) 2 执行结果为:True 2 分析:先计算比较运算符的结果,然后在计算逻辑运算符的结果 二、 class Foo: def __init__(self): self.func() def f 阅读全文
posted @ 2018-08-04 10:34 旧巷子里的猫 阅读(65) 评论(0) 推荐(0) 编辑