Last active
July 19, 2020 03:00
-
-
Save highsmallxu/0a951ed38977bda13f21aecd8c734b41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Job: | |
def __init__(self, person_name): | |
self.name = person_name | |
def task(self): | |
print("working") | |
class Teacher(Job): | |
def task(self): | |
print("teach students") | |
teacher = Teacher("xiaoxu") | |
teacher.task() | |
# teach students |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment