diff --git a/README.md b/README.md index 09980c4..9e5ebe3 100644 --- a/README.md +++ b/README.md @@ -599,6 +599,19 @@ class : self.a = a ``` +### Inheritance +```python +class Person: + def __init__(self, name, age): + self.name = name + self.age = age + +class Employee(Person): + def __init__(self, name, age, staff_num): + super().__init__(name, age) + self.staff_num = staff_num +``` + ### Copy ```python from copy import copy, deepcopy