weixin_慕少4320587
2021-07-09 16:38
class Animal(object): pass dog = Animal() cat = Animal() print(dog) print(cat) print(dog == cat)
class Animal():
pass
dog = Animal()
cat = Animal()
print(dog)
print(cat)
print(dog == cat)
注意约定
Python注重约定,所以一定要严格按照缩进来写代码,缩进错误就会报错!
Python3 进阶教程(新版)
41959 学习 · 236 问题
相似问题