"""클래스 상속은 명확하게 같은 종류이며, 동등한 관계일 때 사용함.
'학생은 사람이다' 라고 했을 때 말이 되면 동등한 관계임.
상속 관계를 is - a 관계라고 부름 (Student is a Person) """
class Person :
def test(self):
print("부모 클래스")
class Test(Person):
def sub_class(self):
print("자식 클래스")
a = Test()
a.test()
a.sub_class()
(참고) 코드를 붙여넣으면 상속 관계를 UI로 볼 수 있는 사이트.
https://pythontutor.com/live.html#mode=edit