摘要: 之前写的,现在好像不可以用了 class Foo: def __init__(self): print("初始化") def __setattr__(self, key, value): """ 属性赋值操作时 self.name = "33" f1.age = 11 # 属性不存在就创建 seta 阅读全文
posted @ 2020-08-10 17:58 3ξ 阅读(112) 评论(0) 推荐(0) 编辑
摘要: a={0,1,2} b={1,3,4,5} print(a - b) a=0 b=1 print(b==1 and a==1) 3 & 3 # 输出为 0, 3 ^ 3 # 输出为3 3 and 4 3 or 4 '''and or 和 & | 在逻辑关系中效果一样''' a=range(1,5) 阅读全文
posted @ 2020-08-10 16:55 3ξ 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 主要就是连接方式; SELECT * FROM tb_students where id=2 and id =3 group by id HAVING id=1 order by sex desc ,age asc limit 0,2 inner join left join right join 阅读全文
posted @ 2020-08-10 16:20 3ξ 阅读(83) 评论(0) 推荐(0) 编辑