Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyClass:
- def __init__(self, favoriteWord):
- self.myProperty = favoriteWord
- #The ToString for Python so that objects can be printed
- def __str__(self):
- return self.myProperty
- class Dog:
- def __init__(self, name, weight, color,):
- self.name = name
- self.weight = weight
- self.color = color
- def make_noise(self):
- print('woof')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement