Skip to content

Instantly share code, notes, and snippets.

@mike11339
Forked from highsmallxu/inheritance-multi.py
Created July 18, 2020 20:41
Show Gist options
  • Save mike11339/c08bec3744a7930aa2407c9a3349f43d to your computer and use it in GitHub Desktop.
Save mike11339/c08bec3744a7930aa2407c9a3349f43d to your computer and use it in GitHub Desktop.
class Dad:
def __init__(self):
self.eye_color = "blue"
self.hair_color = "black"
self.city = "Amsterdam"
def swim(self):
print("I can swim")
class Mum:
def __init__(self):
self.eye_color = "brown"
self.hair_color = "brown"
self.city = "Amsterdam"
def dance(self):
print("I can dance")
class Kid(Dad, Mum):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment