# Enter a code
class Animal():pass
dog=Animal()
cat=Animal()
dog.name='dog'
dog.age=12
cat.name='cat'
cat.age=19
print(cat.age,cat.name)
class Animal():pass
dog=Animal()
cat=Animal()
dog.name='dog'
dog.age=12
cat.name='cat'
cat.age=19
print(cat.age,cat.name)
2021-05-19
# Enter a code
class Animal():pass
dog=Animal()
cat=Animal()
class Animal():pass
dog=Animal()
cat=Animal()
2021-05-19
最赞回答 / weixin_慕哥4444959
isinstance(t,Person)print(isinstance(t,Person))isinstance(t,Student)print(isinstance(t,Student))isinstance(t,Teacher)print(isinstance(t,Teacher))TrueFalseTrue
2021-05-19
最新回答 / 慕九州4260586
class P(object): def __init__(self,name): self.name = nameclass Skill(object): def __init__(self,skill): self.skill = skill class F(Skill): def __init__(self,skill): super(F,self).__init__(skill) #self.skill = 'footba...
2021-05-18
教3.x的python的教程里用的解释器居然还是2.x,还得自己引入《未来》语法支持,答案里标注一个本地练习就行了?我一进来先看答案?线上编辑功能摆好看的?这简直就离谱,都多久了,这玩意没人维护升级吗?
2021-05-11