CollegeWork/OOP/main.py

17 lines
313 B
Python
Raw Normal View History

2023-04-20 13:56:46 +01:00
class SuperClass1:
def __init__(self):
self.foo = "bar"
class SuperClass2:
def __init__(self):
self.bar = "foo"
class DerivedClass(SuperClass1, SuperClass2):
def __init__(self):
SuperClass2.__init__(self)
myDerived = DerivedClass()
print(myDerived.bar)
print(myDerived.foo)