class Animal(object):
pass
dog = Animal()
cat = Animal()
print(dog)
print(cat)
print(dog == cat)
pass
dog = Animal()
cat = Animal()
print(dog)
print(cat)
print(dog == cat)
2025-03-08
最新回答 / tinghai
执行报错:Traceback (most recent call last): File "E:\python\example\lizi.py", line 283, in <module> student = Student('Alice',100) ^^^^^^^^^^^^^^^^^^^^ File "E:\python\example\lizi.py", line 280, in __init__ super(Student, self).__i...
2025-02-07
super详解:https://www.runoob.com/w3cnote/python-super-detail-intro.html
2025-02-01
class Animal(object):
def __init__(self,name,age):
self.name=name
self.age=age
pass
dog: Animal = Animal('dog',3)
cat = Animal('cat',5)
def __init__(self,name,age):
self.name=name
self.age=age
pass
dog: Animal = Animal('dog',3)
cat = Animal('cat',5)
2024-09-19
写的一言难尽。。。。推荐大家耐心看这个算了廖雪峰python学习:https://liaoxuefeng.com/books/python/introduction/index.html
2024-09-13