Skip to content

Instantly share code, notes, and snippets.

@betterdatascience
Created November 13, 2020 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betterdatascience/6d03085f9ca34b4e0643bf2369839401 to your computer and use it in GitHub Desktop.
Save betterdatascience/6d03085f9ca34b4e0643bf2369839401 to your computer and use it in GitHub Desktop.
005_oop
class BMW(Car):
def __init__(self, year, color, plate):
super().__init__(brand='BMW', color=color, plate=plate)
self.year = year
bmw = BMW(year=2018, color='Red', plate='ABCD-123')
print(bmw)
print(bmw.start())
print(bmw.stop())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment