Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BigBadClass:
- def __init__(self):
- #this is normally where you get stuff that gets set up when you initialize the class
- self.pants = "jorts"
- def changepants(self, newpants):
- # you can change the pants!
- self.pants = newpants
- #initialize the class
- pantc = BigBadClass()
- print(pantc.pants)
- pantc.changepants("bellbottoms")
- print(pantc.pants)
Add Comment
Please, Sign In to add comment