python基础特性
str:
find(c,start,end)
replace(str1,str2,替换次数)
dict:
dict.update(weight=80,dept='财务')
pop 删除指定的key
dict.pop('weight')
popitem 删除最后一个kv
dict.popitem()
clear 清空字典
dict.clear()
python字典底层原理
hash("abc")同一次运行hash值一样
类的多态
super().init(self, property)
类的魔法方法
--str--
@property
@--slots-- 使用--slots--限制新的属性和方法,继承之后会拼接父类的--slots--
类的静态方法和实例方法
@staticmethod 静态方法
@classmethod 类方法,相当于二次构造方法
查看3道真题和解析