为什么一直是失败呢?
class animal(object):
pass dog=animal()cat=animal()
dog.name="xiaohuang"
dog.age='1'
cat.name='xiaohua'
cat.age='1.5'
print (dog.name)
print (dog.age)
print (cat.name)
print (cat.age)
class animal(object):
pass dog=animal()cat=animal()
dog.name="xiaohuang"
dog.age='1'
cat.name='xiaohua'
cat.age='1.5'
print (dog.name)
print (dog.age)
print (cat.name)
print (cat.age)
2021-05-07
举报