Skip to content

Instantly share code, notes, and snippets.

@ustropo
Last active February 4, 2023 10:10
Show Gist options
  • Save ustropo/d9a277584f89c1d48b7346419449872b to your computer and use it in GitHub Desktop.
Save ustropo/d9a277584f89c1d48b7346419449872b to your computer and use it in GitHub Desktop.
class Dog(object):
def init(self, name):
self.name = name
def bark(self):
print("Wooof! " + self.name)
def walk(self):
print("Hey! I'm walking!")
d = Dog()
d.init("rex")
d.bark()
d.walk()
## >> Output:
# Wooof! rex
# Hey! I'm walking!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment