![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Night_Emperor
这个作者很懒,什么都没留下…
展开
-
Python基础
1.集合 Set,无序,没有索引,不能切片,集合中的元素都是独一无二的{1,2,3,4,5,6,6} # {1,2,3,4,5,6}{1,2,3,4,5,6} - {3,4} # {1, 2, 5, 6}{1,2,3,4,5,6}&{3,4}# {3, 4} 交集{1,2,3,4,5,6} | {3,4,7}# {1, 2, 3, 4, 5, 6, 7}并集2.字典...原创 2019-01-05 10:37:21 · 297 阅读 · 0 评论 -
Python魔法
__call__(self,[,args...]) :允许实例像函数一样执行class Student(): __number = 100 def __init__(self,name,age): self.name = name self.age = age def __call__(self,name,age): p...原创 2019-01-07 18:04:35 · 348 阅读 · 0 评论 -
Python继承
1. 实例不能修改类的属性值class Student(): num = 100studentA = Student()studentB = Student()studentA.num = 200 #给实例studentA添加一个num属性,赋值200,并没有修改类Student属性num的值print(studentA.num) # 200print(student...原创 2019-01-08 17:52:20 · 326 阅读 · 0 评论