weixin_宝慕林0369336
2023-08-11 13:07
class Animal(object):
pass
dog = Animal()
cat = Animal()
dog.name = '修勾'
dog.age = 1
cat.name = '喵喵'
cat.age = 3
print(dog.name)
print(dog.age)
print(cat.name)
print(cat.age)
看下文件开头有加:# coding:utf-8
Python3 进阶教程(新版)
41910 学习 · 236 问题
相似问题